class NeedsSystemAddressBookSync implements ISetupCheck {
public function __construct(
private IConfig $config,
private IL10N $l10n,
) {
}
class NeedsSystemAddressBookSync {
public function __construct(private IConfig $config, private IL10N $l10n) {}
public function description(): string {
return $this->l10n->t('The DAV system address book sync has not run yet as your instance has more than 1000 users or because an error occurred. Please run it manually by calling "occ dav:sync-system-addressbook".');
public function getName(): string {
return $this->l10n->t('Checking for DAV system address book');
if ($this->config->getAppValue('dav', 'needs_system_address_book_sync', 'no') === 'no') {
return new SetupResult(SetupResult::SUCCESS, $this->l10n->t('The address book sync has already run'));
} else {
return new SetupResult(SetupResult::WARNING, $this->l10n->t('The DAV system address book sync has not run yet as your instance has more than 1000 users or because an error occurred. Please run it manually by calling occ dav:sync-system-addressbook.'));