You are here

public function UltimateCronLogEntry::formatUser in Ultimate Cron 7.2

Format user.

1 call to UltimateCronLogEntry::formatUser()
UltimateCronLogEntry::formatInitMessage in ./ultimate_cron.plugin.inc
Format initial message.

File

./ultimate_cron.plugin.inc, line 1575
Plugin framework for Ultimate Cron.

Class

UltimateCronLogEntry
Abstract class for Ultimate Cron log entries.

Code

public function formatUser() {
  $username = t('anonymous') . ' (0)';
  if ($this->uid) {
    $user = user_load($this->uid);
    $username = $user ? $user->name . " ({$user->uid})" : t('N/A');
  }
  return $username;
}