Skip to content

Commit

Permalink
Merge pull request #48569 from nextcloud/backport/48532/stable28
Browse files Browse the repository at this point in the history
[stable28] fix: do not reduce count for subadmins if they are members of group
  • Loading branch information
nickvergessen authored Oct 29, 2024
2 parents 8e9a410 + b1e5de9 commit ea07104
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions apps/settings/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,6 @@ public function usersList(): TemplateResponse {
foreach ($groups as $key => $group) {
// $userCount += (int)$group['usercount'];
$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)) {
$groups[$key]['usercount']--;
$userCount -= 1; // we also lower from one the total count
}
}
$userCount += $this->userManager->countUsersOfGroups($groupsInfo->getGroups());
$disabledUsers = $this->userManager->countDisabledUsersOfGroups($groupsIds);
Expand Down

0 comments on commit ea07104

Please sign in to comment.