mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix: Use the new countUsersTotal method where it makes sense
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
e187e4e87f
commit
b45bc2a462
2 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue