mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-19 09:51:35 +02:00
Add early exit if user model is null
This commit is contained in:
@@ -34,7 +34,7 @@ class LogoutListener extends AbstractAccessListener
|
|||||||
*/
|
*/
|
||||||
public function handle(mixed $event) : void
|
public function handle(mixed $event) : void
|
||||||
{
|
{
|
||||||
if (! $event instanceof Logout) {
|
if (! $event instanceof Logout || $event->user == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user