Skip to content

Commit

Permalink
fix: Fix a small typing problem is user manager
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Jan 14, 2025
1 parent db94aeb commit 892f815
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/User/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ public function countUsers() {

public function countUsersTotal(int $limit = 0, bool $onlyMappedUsers = false): int|false {
$userCount = false;

foreach ($this->backends as $backend) {
if ($onlyMappedUsers && $backend instanceof ICountMappedUsersBackend) {
$backendUsers = $backend->countMappedUsers();
Expand All @@ -505,7 +506,7 @@ public function countUsersTotal(int $limit = 0, bool $onlyMappedUsers = false):
continue;
}
if ($backendUsers !== false) {
$userCount += $backendUsers;
$userCount = (int)$userCount + $backendUsers;
if ($limit > 0) {
if ($userCount >= $limit) {
break;
Expand Down

0 comments on commit 892f815

Please sign in to comment.