Birthday events are generated on upgrade

This commit is contained in:
Thomas Müller 2016-03-10 13:04:50 +01:00
parent b3fef39006
commit 419adc8d50
3 changed files with 17 additions and 1 deletions

View File

@ -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);
}
}
}

View File

@ -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/>

View File

@ -23,3 +23,4 @@ use OCA\Dav\AppInfo\Application;
$app = new Application();
$app->setupCron();
$app->generateBirthdays();