diff options
-rw-r--r-- | apps/user_ldap/lib/Db/GroupMembershipMapper.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/lib/Service/UpdateGroupsService.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Db/GroupMembershipMapper.php b/apps/user_ldap/lib/Db/GroupMembershipMapper.php index 0868f60d2c5..8f6af16b267 100644 --- a/apps/user_ldap/lib/Db/GroupMembershipMapper.php +++ b/apps/user_ldap/lib/Db/GroupMembershipMapper.php @@ -47,7 +47,7 @@ class GroupMembershipMapper extends QBMapper { ->from($this->getTableName()) ->executeQuery(); - $groups = array_map(fn ($row) => $row['groupid'], $result->fetchAll()); + $groups = array_column($result->fetchAll(), 'groupid'); $result->closeCursor(); return $groups; } diff --git a/apps/user_ldap/lib/Service/UpdateGroupsService.php b/apps/user_ldap/lib/Service/UpdateGroupsService.php index 5e463734079..901b1e913eb 100644 --- a/apps/user_ldap/lib/Service/UpdateGroupsService.php +++ b/apps/user_ldap/lib/Service/UpdateGroupsService.php @@ -90,7 +90,7 @@ class UpdateGroupsService { $this->logger->debug('service "updateGroups" – Dealing with {group}.', ['group' => $group]); $groupMemberships = $this->groupMembershipMapper->findGroupMemberships($group); $knownUsers = array_map( - fn (GroupMembership $groupMembership): string => $groupMembership->getUserid(), + static fn (GroupMembership $groupMembership): string => $groupMembership->getUserid(), $groupMemberships ); $groupMemberships = array_combine($knownUsers, $groupMemberships); |