Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions core/Command/Group/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 0;
}

/**
* @param IGroup $group
* @return string[]
*/
public function usersForGroup(IGroup $group) {
$users = array_keys($group->getUsers());
return array_map(function ($userId) {
return (string)$userId;
}, $users);
}

/**
* @param IGroup[] $groups
* @return array
Expand All @@ -88,12 +99,12 @@ private function formatGroups(array $groups, bool $addInfo = false) {
$values = array_map(function (IGroup $group) {
return [
'backends' => $group->getBackendNames(),
'users' => array_keys($group->getUsers()),
'users' => $this->usersForGroup($group),
];
}, $groups);
} else {
$values = array_map(function (IGroup $group) {
return array_keys($group->getUsers());
return $this->usersForGroup($group);
}, $groups);
}
return array_combine($keys, $values);
Expand Down