]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix #4789: Group admins cannot see disabled users 8006/head
authorNeraste <neraste.herr10@gmail.com>
Sun, 26 Nov 2017 23:16:54 +0000 (00:16 +0100)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Tue, 23 Jan 2018 15:07:23 +0000 (16:07 +0100)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
settings/Controller/UsersController.php

index 36ac263b8cd83900ab958d69d1e1fc318ee8db12..fc0aa4118aa97834aeede48a3c4a17a8e6118a63 100644 (file)
@@ -302,7 +302,9 @@ class UsersController extends Controller {
 
                        // 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);
 
@@ -310,8 +312,6 @@ class UsersController extends Controller {
                                                $batch[$uid] = $displayName;
                                        }
                                }
-                       } else {
-                               $batch = $this->groupManager->displayNamesInGroup($gid, $pattern, $limit, $offset);
                        }
                        $batch = $this->getUsersForUID($batch);