diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-01-14 12:38:02 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-01-14 12:38:02 +0100 |
commit | b45bc2a4624d234ebd8d43f001aeedc6db52af58 (patch) | |
tree | d5f4896e4ed376e7ed387bb586e28f5be1ecd0a0 | |
parent | e187e4e87f73b6b17e40248d8779b8defe139a90 (diff) | |
download | nextcloud-server-b45bc2a4624d234ebd8d43f001aeedc6db52af58.tar.gz nextcloud-server-b45bc2a4624d234ebd8d43f001aeedc6db52af58.zip |
fix: Use the new countUsersTotal method where it makes sense
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | apps/dav/lib/Migration/Version1027Date20230504122946.php | 2 | ||||
-rw-r--r-- | lib/base.php | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/apps/dav/lib/Migration/Version1027Date20230504122946.php b/apps/dav/lib/Migration/Version1027Date20230504122946.php index f294cf192c2..89c192a8419 100644 --- a/apps/dav/lib/Migration/Version1027Date20230504122946.php +++ b/apps/dav/lib/Migration/Version1027Date20230504122946.php @@ -33,7 +33,7 @@ class Version1027Date20230504122946 extends SimpleMigrationStep { * @param array $options */ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { - if ($this->userManager->countSeenUsers() > 100 || array_sum($this->userManager->countUsers()) > 100) { + if ($this->userManager->countSeenUsers() > 100 || $this->userManager->countUsersTotal(100) >= 100) { $this->config->setAppValue('dav', 'needs_system_address_book_sync', 'yes'); $output->info('Could not sync system address books during update - too many user records have been found. Please call occ dav:sync-system-addressbook manually.'); return; diff --git a/lib/base.php b/lib/base.php index b0334ecd729..25f978df836 100644 --- a/lib/base.php +++ b/lib/base.php @@ -279,8 +279,7 @@ class OC { } if (!$tooBig) { // count users - $stats = Server::get(\OCP\IUserManager::class)->countUsers(); - $totalUsers = array_sum($stats); + $totalUsers = Server::get(\OCP\IUserManager::class)->countUsersTotal(51); $tooBig = ($totalUsers > 50); } } |