aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2024-09-30 11:59:06 +0200
committerGitHub <noreply@github.com>2024-09-30 11:59:06 +0200
commit54cdd42ba93229626aade5e56f5050af657ed8c6 (patch)
treef8d18dc87cfffcc28f1e83151ecdc0c72c6d5984
parentc7895bc3cf835f5bc11acc8e89b82757110f2016 (diff)
parent2b2b4e9e96a3bd07dc099f1500f0854527585b0e (diff)
downloadnextcloud-server-54cdd42ba93229626aade5e56f5050af657ed8c6.tar.gz
nextcloud-server-54cdd42ba93229626aade5e56f5050af657ed8c6.zip
Merge pull request #48437 from nextcloud/fix/noid/count-disabled-correct
-rw-r--r--apps/settings/lib/Controller/UsersController.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php
index 71f256f57d6..88a2a6ba6eb 100644
--- a/apps/settings/lib/Controller/UsersController.php
+++ b/apps/settings/lib/Controller/UsersController.php
@@ -147,13 +147,13 @@ class UsersController extends Controller {
}, 0);
} else {
// User is subadmin !
- // Map group list to names to retrieve the countDisabledUsersOfGroups
+ // Map group list to ids to retrieve the countDisabledUsersOfGroups
$userGroups = $this->groupManager->getUserGroups($user);
- $groupsNames = [];
+ $groupsIds = [];
foreach ($groups as $key => $group) {
// $userCount += (int)$group['usercount'];
- $groupsNames[] = $group['name'];
+ $groupsIds[] = $group['id'];
// we prevent subadmins from looking up themselves
// so we lower the count of the groups he belongs to
if (array_key_exists($group['id'], $userGroups)) {
@@ -163,7 +163,7 @@ class UsersController extends Controller {
}
$userCount += $this->userManager->countUsersOfGroups($groupsInfo->getGroups());
- $disabledUsers = $this->userManager->countDisabledUsersOfGroups($groupsNames);
+ $disabledUsers = $this->userManager->countDisabledUsersOfGroups($groupsIds);
}
$userCount -= $disabledUsers;