Commit bd808e2f authored by Bart Vullings's avatar Bart Vullings

ZP-1318 Caldav only set ORGANIZER if ATTENDEE. Released under the Affero GNU...

ZP-1318 Caldav only set ORGANIZER if ATTENDEE. Released under the Affero GNU General Public License (AGPL) version 3.
parent 665d37cc
...@@ -1074,11 +1074,14 @@ class BackendCalDAV extends BackendDiff { ...@@ -1074,11 +1074,14 @@ class BackendCalDAV extends BackendDiff {
} }
} }
if ($is_meeting) { if ($is_meeting) {
if (isset($data->organizername)) { if (isset($data->organizeremail) && isset($data->organizername)) {
$vevent->AddProperty("ORGANIZER", sprintf("MAILTO:%s", $data->organizeremail), array("CN" => $data->organizername)); $vevent->AddProperty("ORGANIZER", sprintf("MAILTO:%s", $data->organizeremail), array("CN" => $data->organizername));
} }
elseif (isset($data->organizeremail)) {
$vevent->AddProperty("ORGANIZER", sprintf("MAILTO:%s", $data->organizeremail));
}
else { else {
//Some phones don't send the organizeremail, so we gotto get it somewhere else. //Some phones doesn't send the organizeremail, so we gotto get it somewhere else.
//Lets use the login here ($username) //Lets use the login here ($username)
$vevent->AddProperty("ORGANIZER", sprintf("MAILTO:%s", $data->originalUsername)); $vevent->AddProperty("ORGANIZER", sprintf("MAILTO:%s", $data->originalUsername));
} }
......
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