improve equality detection of same user

This commit is contained in:
Kevin Papst
2024-06-15 11:40:28 +02:00
parent 8578bbe033
commit 72350b76c0
2 changed files with 13 additions and 1 deletions

View File

@@ -1026,7 +1026,11 @@ class User implements UserInterface, EquatableInterface, ThemeUserInterface, Pas
public function isEqualTo(UserInterface $user): bool
{
if (!$user instanceof self) {
if (!$user instanceof User) {
return false;
}
if ($this->id !== $user->getId()) {
return false;
}