public function JsonLogData::setAccount in JSONlog 8
Same name and namespace in other branches
- 8.2 src/Logger/JsonLogData.php \Drupal\jsonlog\Logger\JsonLogData::setAccount()
- 3.x src/Logger/JsonLogData.php \Drupal\jsonlog\Logger\JsonLogData::setAccount()
Parameters
\Drupal\Core\Session\AccountProxyInterface|NULL $account:
File
- src/
Logger/ JsonLogData.php, line 149
Class
Namespace
Drupal\jsonlog\LoggerCode
public function setAccount($account) {
if ($account) {
$this->uid = $account
->id();
$this->username = $account
->getAccountName();
}
else {
$this->uid = 0;
$this->username = '';
}
}