Merge pull request #48571 from nextcloud/backport/48532/stable30

This commit is contained in:
Kate 2024-10-29 10:26:18 +01:00 committed by GitHub
commit 7bd791f327
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,12 +154,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());