diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-10 13:04:50 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-10 13:04:50 +0100 |
commit | b021c8c475c05897f6bf7b71b6961f4bbc85b352 (patch) | |
tree | 4aa1e7bb9ff74bce6ad529a81739a65d4ec92b36 /apps/dav/appinfo/application.php | |
parent | 51072f742ea2988d8e485dff60d81834e077fe3f (diff) | |
download | nextcloud-server-b021c8c475c05897f6bf7b71b6961f4bbc85b352.tar.gz nextcloud-server-b021c8c475c05897f6bf7b71b6961f4bbc85b352.zip |
Birthday events are generated on upgrade
Diffstat (limited to 'apps/dav/appinfo/application.php')
-rw-r--r-- | apps/dav/appinfo/application.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/dav/appinfo/application.php b/apps/dav/appinfo/application.php index 1dae3d4efbf..d06daf97f54 100644 --- a/apps/dav/appinfo/application.php +++ b/apps/dav/appinfo/application.php @@ -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); + } + } } |