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