Fix: Avoid null pointer exception
This commit is contained in:
@@ -13,6 +13,10 @@ class LogoutListener
|
|||||||
|
|
||||||
public function onLogout(LogoutEvent $event): void
|
public function onLogout(LogoutEvent $event): void
|
||||||
{
|
{
|
||||||
|
if (null === $event->getToken()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->authenticationLogger->info('Logout', [
|
$this->authenticationLogger->info('Logout', [
|
||||||
'user' => $event->getToken()->getUserIdentifier(),
|
'user' => $event->getToken()->getUserIdentifier(),
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user