summaryrefslogtreecommitdiff
path: root/modules/rest/helpers/rest.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rest/helpers/rest.php')
-rw-r--r--modules/rest/helpers/rest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php
index 7440350f..49999520 100644
--- a/modules/rest/helpers/rest.php
+++ b/modules/rest/helpers/rest.php
@@ -37,13 +37,13 @@ class rest_Core {
}
}
- static function set_active_user($access_token) {
- if (empty($access_token)) {
+ static function set_active_user($access_key) {
+ if (empty($access_key)) {
throw new Rest_Exception("Forbidden", 403);
}
- $key = ORM::factory("user_access_token")
- ->where("access_key", "=", $access_token)
+ $key = ORM::factory("user_access_key")
+ ->where("access_key", "=", $access_key)
->find();
if (!$key->loaded()) {
@@ -58,8 +58,8 @@ class rest_Core {
identity::set_active_user($user);
}
- static function get_access_token($user_id) {
- $key = ORM::factory("user_access_token")
+ static function get_access_key($user_id) {
+ $key = ORM::factory("user_access_key")
->where("user_id", "=", $user_id)
->find();