From 6ba1737c22a002a71210fcd15ad36c3c2bc68402 Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 14 May 2010 16:27:08 +0000 Subject: merge -r5832:5898 from 1.7 to trunk. git-svn-id: http://code.elgg.org/elgg/trunk@6055 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/api.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engine/lib/api.php') 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')); } } -- cgit v1.2.3