aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-04-06 16:27:57 +0200
committerRobin Appelman <robin@icewind.nl>2023-04-06 16:31:39 +0200
commitb89621e8da04f0365dcc53fff85b31e5d36aaac9 (patch)
tree5973f4117840479d1c215c5f64562a8e887bc8a9
parent1ac7a3f10730824c0c15671e3303ab57f12e217d (diff)
downloadnextcloud-server-b89621e8da04f0365dcc53fff85b31e5d36aaac9.tar.gz
nextcloud-server-b89621e8da04f0365dcc53fff85b31e5d36aaac9.zip
fix output for group:list command with numeric user ids
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--core/Command/Group/ListCommand.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/Command/Group/ListCommand.php b/core/Command/Group/ListCommand.php
index 5100a00c60a..0285cc05dcd 100644
--- a/core/Command/Group/ListCommand.php
+++ b/core/Command/Group/ListCommand.php
@@ -76,6 +76,17 @@ class ListCommand extends Base {
}
/**
+ * @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
*/
@@ -88,12 +99,12 @@ class ListCommand extends Base {
$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);