Browse Source

Birthday events are generated on upgrade

tags/v9.1.0beta1
Thomas Müller 8 years ago
parent
commit
b021c8c475
3 changed files with 17 additions and 1 deletions
  1. 15
    0
      apps/dav/appinfo/application.php
  2. 1
    1
      apps/dav/appinfo/info.xml
  3. 1
    0
      apps/dav/appinfo/update.php

+ 15
- 0
apps/dav/appinfo/application.php 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);
}
}
}

+ 1
- 1
apps/dav/appinfo/info.xml View File

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

+ 1
- 0
apps/dav/appinfo/update.php View File

@@ -23,3 +23,4 @@ use OCA\Dav\AppInfo\Application;

$app = new Application();
$app->setupCron();
$app->generateBirthdays();

Loading…
Cancel
Save