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 | |
parent | 51072f742ea2988d8e485dff60d81834e077fe3f (diff) | |
download | nextcloud-server-b021c8c475c05897f6bf7b71b6961f4bbc85b352.tar.gz nextcloud-server-b021c8c475c05897f6bf7b71b6961f4bbc85b352.zip |
Birthday events are generated on upgrade
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/appinfo/application.php | 15 | ||||
-rw-r--r-- | apps/dav/appinfo/info.xml | 2 | ||||
-rw-r--r-- | apps/dav/appinfo/update.php | 1 |
3 files changed, 17 insertions, 1 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); + } + } } diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml index 4f1e805d99e..82d0f7cf8a1 100644 --- a/apps/dav/appinfo/info.xml +++ b/apps/dav/appinfo/info.xml @@ -5,7 +5,7 @@ <description>ownCloud WebDAV endpoint</description> <licence>AGPL</licence> <author>owncloud.org</author> - <version>0.2.1</version> + <version>0.2.2</version> <default_enable/> <types> <filesystem/> diff --git a/apps/dav/appinfo/update.php b/apps/dav/appinfo/update.php index aaa36052cd2..fbd41d25f49 100644 --- a/apps/dav/appinfo/update.php +++ b/apps/dav/appinfo/update.php @@ -23,3 +23,4 @@ use OCA\Dav\AppInfo\Application; $app = new Application(); $app->setupCron(); +$app->generateBirthdays(); |