diff --git a/core/modules/user/src/RoleStorage.php b/core/modules/user/src/RoleStorage.php index 947a883..09bb9f8 100644 --- a/core/modules/user/src/RoleStorage.php +++ b/core/modules/user/src/RoleStorage.php @@ -47,7 +47,7 @@ public function resetCache(array $ids = NULL) { // RoleInterface::AUTHENTICATED_ID. // @see user_roles() $user_roles = array_filter($user_roles, function (array $roles) use ($ids) { - return array_intersect(array_keys($roles), $ids); + return !array_intersect(array_keys($roles), $ids); }); } } diff --git a/core/modules/user/src/Tests/UserRoleDeleteTest.php b/core/modules/user/src/Tests/UserRoleDeleteTest.php index 943283f..b1d13c3 100644 --- a/core/modules/user/src/Tests/UserRoleDeleteTest.php +++ b/core/modules/user/src/Tests/UserRoleDeleteTest.php @@ -85,7 +85,7 @@ public function testRoleDeleteUserRoleReferenceDelete() { */ public function testStaticCacheInvalidation() { $role = Role::create([ - 'id' => Unicode::strtolower($this->randomMachineName()) + 'id' => Unicode::strtolower($this->randomMachineName()) ]); $role->save();