diff options
Diffstat (limited to 'engine/lib/api.php')
-rw-r--r-- | engine/lib/api.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/api.php b/engine/lib/api.php index 6b773138e..6707a7418 100644 --- a/engine/lib/api.php +++ b/engine/lib/api.php @@ -423,9 +423,11 @@ function authenticate_method($method) { } } - // check user authentication if required + $user_auth_result = pam_authenticate(); + + // check if user authentication is required if ($API_METHODS[$method]["require_user_auth"] == true) { - if (pam_authenticate() == false) { + if ($user_auth_result == false) { throw new APIException(elgg_echo('APIException:UserAuthenticationFailed')); } } |