diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index 6f6fa0ba379e3..4a713daeba0b4 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -319,7 +319,7 @@ public function getLocalSystemAddressBook() { public function syncInstance(\Closure $progressCallback = null) { $systemAddressBook = $this->getLocalSystemAddressBook(); - $this->userManager->callForAllUsers(function($user) use ($systemAddressBook, $progressCallback) { + $this->userManager->callForSeenUsers(function($user) use ($systemAddressBook, $progressCallback) { $this->updateUser($user); if (!is_null($progressCallback)) { $progressCallback(); diff --git a/apps/dav/lib/Command/SyncBirthdayCalendar.php b/apps/dav/lib/Command/SyncBirthdayCalendar.php index 88f85a9881278..3d1bcab6c3162 100644 --- a/apps/dav/lib/Command/SyncBirthdayCalendar.php +++ b/apps/dav/lib/Command/SyncBirthdayCalendar.php @@ -92,7 +92,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln("Start birthday calendar sync for all users ..."); $p = new ProgressBar($output); $p->start(); - $this->userManager->callForAllUsers(function($user) use ($p) { + $this->userManager->callForSeenUsers(function($user) use ($p) { $p->advance(); $userId = $user->getUID(); diff --git a/apps/dav/lib/Controller/BirthdayCalendarController.php b/apps/dav/lib/Controller/BirthdayCalendarController.php index 244111e3aec41..4964de0b216c5 100644 --- a/apps/dav/lib/Controller/BirthdayCalendarController.php +++ b/apps/dav/lib/Controller/BirthdayCalendarController.php @@ -93,7 +93,7 @@ public function enable() { $this->config->setAppValue($this->appName, 'generateBirthdayCalendar', 'yes'); // add background job for each user - $this->userManager->callForAllUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function(IUser $user) { $this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [ 'userId' => $user->getUID(), ]); diff --git a/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php b/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php index 2c2b4eb0e9ac1..263e6d00db460 100644 --- a/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php +++ b/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php @@ -72,7 +72,7 @@ public function run(IOutput $output) { } $output->info('Adding background jobs to regenerate birthday calendar'); - $this->userManager->callForAllUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function(IUser $user) { $this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [ 'userId' => $user->getUID(), 'purgeBeforeGenerating' => true @@ -82,4 +82,4 @@ public function run(IOutput $output) { // if all were done, no need to redo the repair during next upgrade $this->config->setAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix', 'yes'); } -} \ No newline at end of file +} diff --git a/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php b/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php index 46ed58df4f939..a105daa2608dc 100644 --- a/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php +++ b/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php @@ -78,7 +78,7 @@ public function testEnable() { ->with('dav', 'generateBirthdayCalendar', 'yes'); $this->userManager->expects($this->once()) - ->method('callForAllUsers') + ->method('callForSeenUsers') ->will($this->returnCallback(function($closure) { $user1 = $this->createMock(IUser::class); $user1->method('getUID')->will($this->returnValue('uid1')); diff --git a/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php b/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php index 05e12bbda6ef8..74af6af88dcd2 100644 --- a/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php +++ b/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php @@ -76,7 +76,7 @@ public function testRun() { ->with('Adding background jobs to regenerate birthday calendar'); $this->userManager->expects($this->once()) - ->method('callForAllUsers') + ->method('callForSeenUsers') ->will($this->returnCallback(function($closure) { $user1 = $this->createMock(IUser::class); $user1->method('getUID')->will($this->returnValue('uid1')); @@ -128,10 +128,10 @@ public function testRunSecondTime() { ->with('Repair step already executed'); $this->userManager->expects($this->never()) - ->method('callForAllUsers'); + ->method('callForSeenUsers'); $this->migration->run($output); } -} \ No newline at end of file +} diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 905a199a1a622..27dcb2fc33163 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -59,7 +59,6 @@ use OC\Cache\CappedMemoryCache; use OCP\IDBConnection; -use OCP\ILogger; use OCP\User\Backend\ABackend; use OCP\User\Backend\ICheckPasswordBackend; use OCP\User\Backend\ICountUsersBackend; @@ -68,7 +67,6 @@ use OCP\User\Backend\IGetHomeBackend; use OCP\User\Backend\ISetDisplayNameBackend; use OCP\User\Backend\ISetPasswordBackend; -use OCP\Util; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\GenericEvent;