Merge pull request #23453 from owncloud/generate-birthdays-on-upgrade-stable9
Generate birthdays on upgrade stable9
This commit is contained in:
commit
ae2c207b6e
|
@ -210,4 +210,19 @@ class Application extends App {
|
|||
$this->getContainer()->getServer()->getLogger()->logException($ex);
|
||||
}
|
||||
}
|
||||
|
||||
public function generateBirthdays() {
|
||||
try {
|
||||
/** @var BirthdayService $migration */
|
||||
$migration = $this->getContainer()->query('BirthdayService');
|
||||
$userManager = $this->getContainer()->getServer()->getUserManager();
|
||||
|
||||
$userManager->callForAllUsers(function($user) use($migration) {
|
||||
/** @var IUser $user */
|
||||
$migration->syncUser($user->getUID());
|
||||
});
|
||||
} catch (\Exception $ex) {
|
||||
$this->getContainer()->getServer()->getLogger()->logException($ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<description>ownCloud WebDAV endpoint</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>owncloud.org</author>
|
||||
<version>0.1.5</version>
|
||||
<version>0.1.6</version>
|
||||
<default_enable/>
|
||||
<types>
|
||||
<filesystem/>
|
||||
|
|
|
@ -25,3 +25,4 @@ $app = new Application();
|
|||
$app->setupCron();
|
||||
$app->migrateAddressbooks();
|
||||
$app->migrateCalendars();
|
||||
$app->generateBirthdays();
|
||||
|
|
|
@ -23,3 +23,4 @@ use OCA\Dav\AppInfo\Application;
|
|||
|
||||
$app = new Application();
|
||||
$app->setupCron();
|
||||
$app->generateBirthdays();
|
||||
|
|
Loading…
Reference in New Issue