You are here

function pfdp_get_user_log_details in Private files download permission 8.2

Same name and namespace in other branches
  1. 3.x pfdp.module \pfdp_get_user_log_details()

Returns a properly formatted user string to be used in a log line.

1 call to pfdp_get_user_log_details()
pfdp_file_download in ./pfdp.module

File

./pfdp.module, line 14
Implements the main module function and generic helper functions.

Code

function pfdp_get_user_log_details($user) {
  if (!$user) {
    return NULL;
  }
  return $user
    ->id() . ' (' . ($user
    ->getAccountName() ? $user
    ->getAccountName() : '-') . ', ' . ($user
    ->getDisplayName() ? $user
    ->getDisplayName() : '-') . ')';
}