Use limit and offset for subadmin users
This commit is contained in:
parent
a1c88a3e39
commit
651245effa
2 changed files with 3 additions and 3 deletions
|
@ -33,11 +33,11 @@ $users = array();
|
|||
if (OC_Group::inGroup(OC_User::getUser(), 'admin')) {
|
||||
$batch = OC_User::getUsers('', 10, $offset);
|
||||
foreach ($batch as $user) {
|
||||
$users[] = array('name' => $user, 'groups' => join(', ', OC_Group::getUserGroups($user)), 'subadmin' => implode(', ',OC_SubAdmin::getSubAdminsGroups($user)), 'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default'));
|
||||
$users[] = array('name' => $user, 'groups' => join(', ', OC_Group::getUserGroups($user)), 'subadmin' => join(', ',OC_SubAdmin::getSubAdminsGroups($user)), 'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default'));
|
||||
}
|
||||
} else {
|
||||
$groups = OC_SubAdmin::getSubAdminsGroups(OC_User::getUser());
|
||||
$batch = OC_Group::usersInGroups($groups);
|
||||
$batch = OC_Group::usersInGroups($groups, '', 10, $offset);
|
||||
foreach ($batch as $user) {
|
||||
$users[] = array('name' => $user, 'groups' => join(', ', OC_Group::getUserGroups($user)), 'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default'));
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ if($isadmin){
|
|||
$subadmins = OC_SubAdmin::getAllSubAdmins();
|
||||
}else{
|
||||
$accessiblegroups = OC_SubAdmin::getSubAdminsGroups(OC_User::getUser());
|
||||
$accessibleusers = OC_Group::usersInGroups($accessiblegroups);
|
||||
$accessibleusers = OC_Group::usersInGroups($accessiblegroups, '', 30);
|
||||
$subadmins = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue