Skip to content

Commit 2622dda

Browse files
committed
Fix #4789: Group admins cannot see disabled users
1 parent 63d9857 commit 2622dda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

settings/Controller/UsersController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,16 @@ public function index($offset = 0, $limit = 10, $gid = '', $pattern = '', $backe
339339

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

346348
foreach ($groupUsers as $uid => $displayName) {
347349
$batch[$uid] = $displayName;
348350
}
349351
}
350-
} else {
351-
$batch = $this->groupManager->displayNamesInGroup($gid, $pattern, $limit, $offset);
352352
}
353353
$batch = $this->getUsersForUID($batch);
354354

0 commit comments

Comments
 (0)