diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-18 23:07:49 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-18 23:07:49 +0200 |
commit | d0ad8e6e695ff18a7017caae88c97bed35adf92a (patch) | |
tree | 878e5fea5946961415ce10a2ea61b3dfd20d7d24 /apps/dav/lib | |
parent | a5d3e5ed6893b35dc473a479105d95f03a403999 (diff) | |
download | nextcloud-server-d0ad8e6e695ff18a7017caae88c97bed35adf92a.tar.gz nextcloud-server-d0ad8e6e695ff18a7017caae88c97bed35adf92a.zip |
Revert "Fix displayname for initial calendars and address books - fixes #24057"
This reverts commit a5d3e5ed6893b35dc473a479105d95f03a403999.
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/hookmanager.php | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/apps/dav/lib/hookmanager.php b/apps/dav/lib/hookmanager.php index 687e6718db3..4a4704ff2a2 100644 --- a/apps/dav/lib/hookmanager.php +++ b/apps/dav/lib/hookmanager.php @@ -100,26 +100,26 @@ class HookManager { public function postLogin($params) { $user = $this->userManager->get($params['uid']); - if (!is_null($user)) { - $principal = 'principals/users/' . $user->getUID(); - $calendars = $this->calDav->getCalendarsForUser($principal); - if (empty($calendars)) { - try { - $this->calDav->createCalendar($principal, 'personal', [ - '{DAV:}displayname' => 'Personal']); - } catch (\Exception $ex) { - \OC::$server->getLogger()->logException($ex); - } + + $principal = 'principals/users/' . $user->getUID(); + $calendars = $this->calDav->getCalendarsForUser($principal); + if (empty($calendars)) { + try { + $this->calDav->createCalendar($principal, 'personal', [ + 'displayname' => 'Personal']); + } catch (\Exception $ex) { + \OC::$server->getLogger()->logException($ex); } - $books = $this->cardDav->getAddressBooksForUser($principal); - if (empty($books)) { - try { - $this->cardDav->createAddressBook($principal, 'contacts', [ - '{DAV:}displayname' => 'Contacts']); - } catch (\Exception $ex) { - \OC::$server->getLogger()->logException($ex); - } + } + $books = $this->cardDav->getAddressBooksForUser($principal); + if (empty($books)) { + try { + $this->cardDav->createAddressBook($principal, 'contacts', [ + 'displayname' => 'Contacts']); + } catch (\Exception $ex) { + \OC::$server->getLogger()->logException($ex); } } + } } |