Birthday events are generated on upgrade
This commit is contained in:
parent
b3fef39006
commit
419adc8d50
|
@ -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/>
|
||||
|
|
|
@ -23,3 +23,4 @@ use OCA\Dav\AppInfo\Application;
|
|||
|
||||
$app = new Application();
|
||||
$app->setupCron();
|
||||
$app->generateBirthdays();
|
||||
|
|
Loading…
Reference in New Issue