Merge pull request #48569 from nextcloud/backport/48532/stable28

[stable28] fix: do not reduce count for subadmins if they are members of group
pull/48966/head
Joas Schilling 2024-10-29 10:31:25 +07:00 committed by GitHub
commit ea0710404e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 6 deletions

@ -221,12 +221,6 @@ class UsersController extends Controller {
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);