]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Set the error code when user authentication fail
authorLuciano Lima <lucianomlima@ymail.com>
Wed, 30 Jan 2013 03:05:38 +0000 (00:05 -0300)
committerCash Costello <cash.costello@gmail.com>
Wed, 30 Jan 2013 12:41:31 +0000 (07:41 -0500)
Signed-off-by: Luciano Lima <lucianomlima@ymail.com>
engine/lib/web_services.php

index 1a15ecc15c0df6e8a8796c182c50539ce9d55ed7..b6289184af863f3901e286b47f6264d3ed0be0ab 100644 (file)
@@ -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);
                }
        }