aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/Migration/Version1027Date20230504122946.php2
-rw-r--r--lib/base.php3
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);
}
}