Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract keys insted of wrong usage of key() #3419

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
## [7.0.3] - tbd
### Fix
- Archive, restore and delete polls in poll list was missing, braught the options back to the action menu
- 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
Expand Down
8 changes: 4 additions & 4 deletions lib/Model/Group/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct(
}

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();
}

Expand All @@ -58,10 +58,10 @@ private function setUp(): void {
*/
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;
Expand Down