From c974cb3de8a60353ae5504cecac9b0b312e53605 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 30 Apr 2012 11:18:04 -0700 Subject: [PATCH] Minor, futher sort out auth exceptions in Conduit + access log. --- .../controller/api/PhabricatorConduitAPIController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/applications/conduit/controller/api/PhabricatorConduitAPIController.php b/src/applications/conduit/controller/api/PhabricatorConduitAPIController.php index 2f100ef3cb..e8b080a924 100644 --- a/src/applications/conduit/controller/api/PhabricatorConduitAPIController.php +++ b/src/applications/conduit/controller/api/PhabricatorConduitAPIController.php @@ -125,9 +125,11 @@ final class PhabricatorConduitAPIController $this->actAsUser($api_request, $metadata['actAsUser']); } - $conduit_user = $api_request->getUser(); - if ($conduit_user && $conduit_user->getPHID()) { - $conduit_username = $conduit_user->getUsername(); + if ($auth_error === null) { + $conduit_user = $api_request->getUser(); + if ($conduit_user && $conduit_user->getPHID()) { + $conduit_username = $conduit_user->getUsername(); + } } }