Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: Use the new countUsersTotal method where it makes sense
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Jan 14, 2025
commit b45bc2a4624d234ebd8d43f001aeedc6db52af58
2 changes: 1 addition & 1 deletion apps/dav/lib/Migration/Version1027Date20230504122946.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(
* @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;
Expand Down
3 changes: 1 addition & 2 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ private static function printUpgradePage(\OC\SystemConfig $systemConfig): void {
}
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);
}
}
Expand Down