8000 [Security][AbstractToken] getUserIdentifier() must return a string · symfony/symfony@2987d58 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2987d58

Browse files
mpiotfabpot
authored andcommitted
[Security][AbstractToken] getUserIdentifier() must return a string
1 parent 527b6a9 commit 2987d58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Security/Core/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)
0