Commit 18c88cd9 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #585 in ZP/z-push from...

Merge pull request #585 in ZP/z-push from bugfix/ZP-1278-caldav-backend-does-not-pick-up-user to develop

* commit 'c6406d4a':
  ZP-1278 Fix caldav backend so the user and (if supplied) domain are picked up for blank organizer fields when sent to mobile. Released under the Affero GNU General Public License (AGPL) version 3.
parents 7a6f93da c6406d4a
...@@ -63,6 +63,12 @@ class BackendCalDAV extends BackendDiff { ...@@ -63,6 +63,12 @@ class BackendCalDAV extends BackendDiff {
$this->_caldav = new CalDAVClient($url, $username, $password); $this->_caldav = new CalDAVClient($url, $username, $password);
if ($connected = $this->_caldav->CheckConnection()) { if ($connected = $this->_caldav->CheckConnection()) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendCalDAV->Logon(): User '%s' is authenticated on CalDAV '%s'", $username, $url)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendCalDAV->Logon(): User '%s' is authenticated on CalDAV '%s'", $username, $url));
if ($domain == "") {
$this->originalUsername = $username;
}
else {
$this->originalUsername = $username . '@' . $domain;
}
} }
else { else {
ZLog::Write(LOGLEVEL_WARN, sprintf("BackendCalDAV->Logon(): User '%s' is not authenticated on CalDAV '%s'", $username, $url)); ZLog::Write(LOGLEVEL_WARN, sprintf("BackendCalDAV->Logon(): User '%s' is not authenticated on CalDAV '%s'", $username, $url));
...@@ -1464,4 +1470,4 @@ class BackendCalDAV extends BackendDiff { ...@@ -1464,4 +1470,4 @@ class BackendCalDAV extends BackendDiff {
$blob = TimezoneUtil::GetSyncBlobFromTZ($tz); $blob = TimezoneUtil::GetSyncBlobFromTZ($tz);
return base64_encode($blob); return base64_encode($blob);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment