Skip to content

Commit 29856be

Browse files
mpiotfabpot
authored andcommitted
[Security][AbstractToken] getUserIdentifier() must return a string
1 parent a2af174 commit 29856be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Authentication/Token/AbstractToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function getRoleNames(): array
4848

4949
public function getUserIdentifier(): string
5050
{
51-
return $this->user->getUserIdentifier();
51+
return $this->user ? $this->user->getUserIdentifier() : '';
5252
}
5353

5454
/**

0 commit comments

Comments
 (0)