Skip to content

Commit

Permalink
fix: do not reduce count for subadmins if they are members of group
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Oct 2, 2024
1 parent 2d004c3 commit f460c33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/settings/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ public function usersList(): TemplateResponse {
$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
}
// 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());
Expand Down

0 comments on commit f460c33

Please sign in to comment.