diff --git a/CHANGELOG.md b/CHANGELOG.md index 03ed6faf6..edd366300 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ### Fix - Archive, restore and delete polls in poll list was missing, braught the options back to the action menu - fix a situation, where votes of a non existing poll are requested + - Fix getting group members ### New - Added an endpoint to the Api to be able to fetch the acl of a poll ## [7.0.2] - 2024-03-29 diff --git a/lib/Model/Group/Group.php b/lib/Model/Group/Group.php index ed2f7c976..cc373012a 100644 --- a/lib/Model/Group/Group.php +++ b/lib/Model/Group/Group.php @@ -49,7 +49,7 @@ class Group extends UserBase { } private function setUp(): void { - $this->group = Container::queryClass(IGroupManager::class)->get($this->id); + $this->group = $this->groupManager->get($this->id); $this->displayName = $this->group->getDisplayName(); } @@ -58,10 +58,10 @@ class Group extends UserBase { */ public function getMembers(): array { $members = []; - $usersInGroup = Container::queryClass(IGroupManager::class)->displayNamesInGroup($this->id); + $usersIdsInGroup = array_keys($this->groupManager->displayNamesInGroup($this->id)); - foreach ($usersInGroup as $user) { - $newMember = new User((string) key($user)); + foreach ($usersIdsInGroup as $userId) { + $newMember = new User($userId); if ($newMember->IsEnabled()) { $members[] = $newMember;