From bc336e7f693106a833af2c77f594a6948afe6ef5 Mon Sep 17 00:00:00 2001 From: tkiehne Date: Thu, 7 Mar 2024 19:19:32 -0800 Subject: [PATCH] loadMultiple does not index by rid like user_roles did --- src/EventSubscriber/UwAuthSubscriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventSubscriber/UwAuthSubscriber.php b/src/EventSubscriber/UwAuthSubscriber.php index 67034a6..849f644 100644 --- a/src/EventSubscriber/UwAuthSubscriber.php +++ b/src/EventSubscriber/UwAuthSubscriber.php @@ -492,7 +492,7 @@ private function syncRoles(AccountInterface $account): void { // Add to newly assigned roles. foreach ($mapped_roles as $mapped) { - if (\array_key_exists($mapped, $roles_existing)) { + if (\in_array($mapped, $roles_existing)) { $account->addRole($mapped); } }