diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php index 68c920dde1781..53ffd62a06d26 100644 --- a/settings/Controller/UsersController.php +++ b/settings/Controller/UsersController.php @@ -339,7 +339,9 @@ 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); @@ -347,8 +349,6 @@ public function index($offset = 0, $limit = 10, $gid = '', $pattern = '', $backe $batch[$uid] = $displayName; } } - } else { - $batch = $this->groupManager->displayNamesInGroup($gid, $pattern, $limit, $offset); } $batch = $this->getUsersForUID($batch);