Commit 62e29924 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1130 Log discovered server URL.

Released under the Affero GNU General Public License (AGPL) version 3.
parent c1a7096f
......@@ -223,13 +223,14 @@ class ZPushAutodiscover {
$xml = file_get_contents('response.xml');
$zpushHost = defined('ZPUSH_HOST') ? ZPUSH_HOST : ( $_SERVER['HTTP_HOST'] ? : $_SERVER['SERVER_NAME']);
$serverUrl = "https://" . $zpushHost . "/Microsoft-Server-ActiveSync";
ZLog::Write(LOGLEVEL_INFO, sprintf("ZPushAutodiscover->createResponse(): server URL: '%s'", $serverUrl));
$response = new SimpleXMLElement($xml);
$response->Response->User->DisplayName = $userFullname;
$response->Response->User->EMailAddress = $email;
$response->Response->Action->Settings->Server->Url = $serverUrl;
$response->Response->Action->Settings->Server->Name = $serverUrl;
$response = $response->asXML();
ZLog::Write(LOGLEVEL_WBXML, sprintf("ZPushAutodiscover->createResponse() XML response:%s%s", PHP_EOL, $response));
ZLog::Write(LOGLEVEL_WBXML, sprintf("ZPushAutodiscover->createResponse(): XML response:%s%s", PHP_EOL, $response));
return $response;
}
......
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