aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-24 17:36:00 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-24 17:36:00 +0000
commit11ecd7e47bd20ec4083e926b0c64586e83193416 (patch)
tree47b126afdf56b07408beb48cff29ddc968a33f51 /engine
parent57aba8905ed784dd18d6232cbd527deb647edeca (diff)
downloadelgg-11ecd7e47bd20ec4083e926b0c64586e83193416.tar.gz
elgg-11ecd7e47bd20ec4083e926b0c64586e83193416.tar.bz2
Fixing oopsy...
git-svn-id: https://code.elgg.org/elgg/trunk@1514 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/api.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/engine/lib/api.php b/engine/lib/api.php
index ed77fe162..933b718e8 100644
--- a/engine/lib/api.php
+++ b/engine/lib/api.php
@@ -627,15 +627,12 @@
$method = get_input('method');
$token = get_input('token');
- if (($method) && ($token))
- {
- $validated_userid = validate_user_token($CONFIG->site_id, $token);
-
- if ((!$METHODS[$method]["require_auth_token"]) || ($validated_userid) || (isloggedin()))
- return true;
- else
- throw new SecurityException(elgg_echo('SecurityException:AuthTokenExpired'), GenericResult::$RESULT_FAIL_AUTHTOKEN);
- }
+ $validated_userid = validate_user_token($CONFIG->site_id, $token);
+
+ if ((!$METHODS[$method]["require_auth_token"]) || ($validated_userid) || (isloggedin()))
+ return true;
+ else
+ throw new SecurityException(elgg_echo('SecurityException:AuthTokenExpired'), GenericResult::$RESULT_FAIL_AUTHTOKEN);
return false;
}