Commit d7c9ef63 authored by mku's avatar mku

ZP-519 #comment fix log output. Move setcookie to try block.

git-svn-id: https://z-push.org/svn/z-push/trunk@1904 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 540ad946
......@@ -108,6 +108,7 @@ class ZPushAutodiscover {
$userFullname = $backend->GetUserFullname($username);
ZLog::Write(LOGLEVEL_WBXML, sprintf("Resolved user's '%s' fullname to '%s'", $username, $userFullname));
$response = $this->createResponse($incomingXml->Request->EMailAddress, $userFullname);
setcookie("membername", $username);
}
catch (AuthenticationRequiredException $ex) {
......@@ -117,7 +118,7 @@ class ZPushAutodiscover {
http_response_code(401);
}
catch (ZPushException $ex) {
ZLog::Write(LOGLEVEL_ERROR, "Unable to complete autodiscover because of ZPushException. Error: %s", $ex->getMessage());
ZLog::Write(LOGLEVEL_ERROR, sprintf("Unable to complete autodiscover because of ZPushException. Error: %s", $ex->getMessage()));
if(!headers_sent()) {
header('HTTP/1.1 '. $ex->getHTTPCodeString());
foreach ($ex->getHTTPHeaders() as $h) {
......@@ -125,7 +126,6 @@ class ZPushAutodiscover {
}
}
}
setcookie("membername", $username);
$this->sendResponse($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