Skip to content

Commit a3e6ee1

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: [Security][AbstractToken] getUserIdentifier() must return a string [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones Email image parts: regex for single closing quote [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum
2 parents c5fd239 + 29856be commit a3e6ee1

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)