summaryrefslogtreecommitdiff
path: root/modules/rest/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rest/helpers')
-rw-r--r--modules/rest/helpers/rest.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php
index 00790e6b..be0644f2 100644
--- a/modules/rest/helpers/rest.php
+++ b/modules/rest/helpers/rest.php
@@ -92,12 +92,10 @@ class rest_Core {
if ($key->loaded()) {
$user = identity::lookup_user($key->user_id);
if (empty($user)) {
- Rest_Exception::trigger(403, "Forbidden", $log_message,
- "User not found: {$key->user_id}");
+ throw new Rest_Exception(403, "Forbidden");
}
} else {
- Rest_Exception::trigger(403, "Forbidden", $log_message,
- "Invalid user access token supplied: {$key->user_id}");
+ throw new Rest_Exception(403, "Forbidden");
}
}
identity::set_active_user($user);