diff --git a/src/Model/Behavior/AuthKeycloakBehavior.php b/src/Model/Behavior/AuthKeycloakBehavior.php index d9a7829..7aeed31 100644 --- a/src/Model/Behavior/AuthKeycloakBehavior.php +++ b/src/Model/Behavior/AuthKeycloakBehavior.php @@ -444,7 +444,7 @@ class AuthKeycloakBehavior extends Behavior $toRemove = array_diff($keycloakUserRoles, array_keys($userRoles)); $changed = false; foreach ($toRemove as $k => $role) { - if (substr($role, 0, strlen('Organisation:')) !== 'Organisation:' && substr($role, 0, strlen('Role:') !== 'Role:')) { + if (substr($role, 0, strlen('Organisation:')) !== 'Organisation:' && substr($role, 0, strlen('Role:')) !== 'Role:') { unset($toRemove[$k]); } else { $toRemove[$k] = $assignedRolesParsed[$role];