summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-07-21 11:20:55 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-07-21 11:20:55 +0200
commite6c75aa9741ca1deab7a77f32e087adcd3bf246a (patch)
tree903ea35a13b70b9f780470ec6cb9e472d1f78a2c /settings
parentddd8eae9320bcd5317f18a6305120c358f72bcdd (diff)
downloadnextcloud-server-e6c75aa9741ca1deab7a77f32e087adcd3bf246a.tar.gz
nextcloud-server-e6c75aa9741ca1deab7a77f32e087adcd3bf246a.zip
Fix username for subadmins and only send subadmin groups
Fix #9748
Diffstat (limited to 'settings')
-rw-r--r--settings/ajax/userlist.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/settings/ajax/userlist.php b/settings/ajax/userlist.php
index 2bf40686b87..a99c221beb8 100644
--- a/settings/ajax/userlist.php
+++ b/settings/ajax/userlist.php
@@ -76,10 +76,13 @@ if (OC_User::isAdminUser(OC_User::getUser())) {
$batch = OC_Group::usersInGroups($groups, $pattern, $limit, $offset);
foreach ($batch as $uid) {
$user = $userManager->get($uid);
+
+ // Only add the groups, this user is a subadmin of
+ $userGroups = array_intersect(OC_Group::getUserGroups($uid), OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()));
$users[] = array(
- 'name' => $user,
+ 'name' => $uid,
'displayname' => $user->getDisplayName(),
- 'groups' => join(', ', OC_Group::getUserGroups($uid)),
+ 'groups' => join(', ', $userGroups),
'quota' => OC_Preferences::getValue($uid, 'files', 'quota', 'default'),
'storageLocation' => $user->getHome(),
'lastLogin' => $user->getLastLogin(),