diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-10-27 14:09:45 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-10-29 11:31:18 +0100 |
commit | c6f6a8758b3f08e47c3a8f45a67d09698376b2e2 (patch) | |
tree | bfd52190961e28ae97fa65a96df05b1fe0390a2f /settings/users.php | |
parent | f428d31a5d1f91c6e7aa96fd8550c75c02cc0963 (diff) | |
download | nextcloud-server-c6f6a8758b3f08e47c3a8f45a67d09698376b2e2.tar.gz nextcloud-server-c6f6a8758b3f08e47c3a8f45a67d09698376b2e2.zip |
Drop OC_SubAdmin and replace usages
Diffstat (limited to 'settings/users.php')
-rw-r--r-- | settings/users.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/settings/users.php b/settings/users.php index 59cc94f5023..dac649aa828 100644 --- a/settings/users.php +++ b/settings/users.php @@ -57,7 +57,12 @@ $config = \OC::$server->getConfig(); $isAdmin = OC_User::isAdminUser(OC_User::getUser()); -$groupsInfo = new \OC\Group\MetaData(OC_User::getUser(), $isAdmin, $groupManager); +$groupsInfo = new \OC\Group\MetaData( + OC_User::getUser(), + $isAdmin, + $groupManager, + \OC::$server->getUserSession() +); $groupsInfo->setSorting($sortGroupsBy); list($adminGroup, $groups) = $groupsInfo->get(); @@ -65,7 +70,16 @@ $recoveryAdminEnabled = OC_App::isEnabled('encryption') && $config->getAppValue( 'encryption', 'recoveryAdminEnabled', null ); if($isAdmin) { - $subadmins = OC_SubAdmin::getAllSubAdmins(); + $subadmins = \OC::$server->getGroupManager()->getSubAdmin()->getAllSubAdmins(); + // New class returns IUser[] so convert back + $result = []; + foreach ($subAdmins as $subAdmin) { + $result[] = [ + 'gid' => $subAdmin['group']->getGID(), + 'uid' => $subAdmin['user']->getUID(), + ]; + } + $subadmins = $result; }else{ /* Retrieve group IDs from $groups array, so we can pass that information into OC_Group::displayNamesInGroups() */ $gids = array(); |