Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: do not reduce count for subadmins if they are members of group
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Oct 2, 2024
commit 0d6acbf9e4658c929e548434cbafe0dbfe6e9d6b
6 changes: 0 additions & 6 deletions apps/settings/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,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());
Expand Down