Commit 8067ab50 authored by xjm's avatar xjm

Issue #2479593 by jhedstrom, zaporylie: Use User::getAnonymousUser() in...

Issue #2479593 by jhedstrom, zaporylie: Use User::getAnonymousUser() in DblogController::eventDetails()
parent 8b569be7
......@@ -18,6 +18,7 @@
use Drupal\Core\Form\FormBuilderInterface;
use Drupal\Core\Logger\RfcLogLevel;
use Drupal\Core\Url;
use Drupal\user\Entity\User;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -247,7 +248,7 @@ public function eventDetails($event_id) {
$message = $this->formatMessage($dblog);
$username = array(
'#theme' => 'username',
'#account' => $this->userStorage->load($dblog->uid ? $dblog->uid : 0),
'#account' => $dblog->uid ? $this->userStorage->load($dblog->uid) : User::getAnonymousUser(),
);
$rows = array(
array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment