Skip to content

Commit

Permalink
Fix #4789: Group admins cannot see disabled users
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
Neraste authored and blizzz committed Jan 23, 2018
1 parent 74ee895 commit 308891f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions settings/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,16 +302,16 @@ public function index($offset = 0, $limit = 10, $gid = '', $pattern = '', $backe

// Batch all groups the user is subadmin of when a group is specified
$batch = [];
if($gid === '') {
if ($gid !== '' && $gid !== '_disabledUsers' && $gid !== '_everyone') {
$batch = $this->groupManager->displayNamesInGroup($gid, $pattern, $limit, $offset);
} else {
foreach($subAdminOfGroups as $group) {
$groupUsers = $this->groupManager->displayNamesInGroup($group, $pattern, $limit, $offset);

foreach($groupUsers as $uid => $displayName) {
$batch[$uid] = $displayName;
}
}
} else {
$batch = $this->groupManager->displayNamesInGroup($gid, $pattern, $limit, $offset);
}
$batch = $this->getUsersForUID($batch);

Expand Down

0 comments on commit 308891f

Please sign in to comment.