summaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-02 15:21:35 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-08 17:13:49 +0100
commit00122fa02704c2e7dc02fde172472167cf3ad42b (patch)
treedb0e8bbc472a41bd3cbaba68d8054f57b7b63aca /settings/Controller
parentcb2fbdd214ddda422fb7a57f5779ca450b6a0411 (diff)
downloadnextcloud-server-00122fa02704c2e7dc02fde172472167cf3ad42b.tar.gz
nextcloud-server-00122fa02704c2e7dc02fde172472167cf3ad42b.zip
Use group displayNames in users list
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'settings/Controller')
-rw-r--r--settings/Controller/UsersController.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php
index d311b9dcb80..6a067a6b59d 100644
--- a/settings/Controller/UsersController.php
+++ b/settings/Controller/UsersController.php
@@ -223,10 +223,7 @@ class UsersController extends Controller {
$restorePossible = true;
}
- $subAdminGroups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($user);
- foreach ($subAdminGroups as $key => $subAdminGroup) {
- $subAdminGroups[$key] = $subAdminGroup->getGID();
- }
+ $subAdminGroups = $this->groupManager->getSubAdmin()->getSubAdminsGroupsName($user);
$displayName = $user->getEMailAddress();
if (is_null($displayName)) {
@@ -243,7 +240,7 @@ class UsersController extends Controller {
return [
'name' => $user->getUID(),
'displayname' => $user->getDisplayName(),
- 'groups' => empty($userGroups) ? $this->groupManager->getUserGroupIds($user) : $userGroups,
+ 'groups' => empty($userGroups) ? $this->groupManager->getUserGroupNames($user) : $userGroups,
'subadmin' => $subAdminGroups,
'quota' => $user->getQuota(),
'quota_bytes' => Util::computerFileSize($user->getQuota()),
@@ -344,7 +341,7 @@ class UsersController extends Controller {
foreach ($batch as $user) {
// Only add the groups, this user is a subadmin of
$userGroups = array_values(array_intersect(
- $this->groupManager->getUserGroupIds($user),
+ $this->groupManager->getUserGroupNames($user),
$subAdminOfGroups
));
if (($gid !== '_disabledUsers' && $user->isEnabled()) ||
@@ -484,7 +481,7 @@ class UsersController extends Controller {
}
}
// fetch users groups
- $userGroups = $this->groupManager->getUserGroupIds($user);
+ $userGroups = $this->groupManager->getUserGroupNames($user);
return new DataResponse(
$this->formatUserForIndex($user, $userGroups),