diff options
Diffstat (limited to 'settings/Controller/UsersController.php')
-rw-r--r-- | settings/Controller/UsersController.php | 11 |
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), |