From 6a73322353db0e17bdf86a9db8d7d3f2582740de Mon Sep 17 00:00:00 2001 From: Luciano Lima Date: Wed, 30 Jan 2013 00:05:38 -0300 Subject: Set the error code when user authentication fail Signed-off-by: Luciano Lima --- engine/lib/web_services.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/lib/web_services.php b/engine/lib/web_services.php index 1a15ecc15..b6289184a 100644 --- a/engine/lib/web_services.php +++ b/engine/lib/web_services.php @@ -178,7 +178,7 @@ function authenticate_method($method) { // check if user authentication is required if ($API_METHODS[$method]["require_user_auth"] == true) { if ($user_auth_result == false) { - throw new APIException($user_pam->getFailureMessage()); + throw new APIException($user_pam->getFailureMessage(), ErrorResult::$RESULT_FAIL_AUTHTOKEN); } } -- cgit v1.2.3