8000 Fix wrong roles comparison · thlbaut/symfony@e041dec · GitHub
[go: up one dir, main page]

Skip to content

Commit e041dec

Browse files
authored
Fix wrong roles comparison
Issue : symfony#35941
1 parent d246e94 commit e041dec

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
@@ -323,7 +323,7 @@ private function hasUserChanged(UserInterface $user): bool
323323
$userRoles[] = 'ROLE_PREVIOUS_ADMIN';
324324
}
325325

326-
if (\count($userRoles) !== \coun 5251 t($this->getRoleNames()) || \count($userRoles) !== \count(array_intersect($userRoles, $this->getRoleNames()))) {
326+
if (\count($userRoles) !== \count($this->user->getRoles()) || \count($userRoles) !== \count(array_intersect($userRoles, $this->user->getRoles()))) {
327327
return true;
328328
}
329329

0 commit comments

Comments
 (0)
0