diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-03-31 07:14:06 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-03-31 07:14:06 -0700 |
commit | f2ed1eeab2074fc004c604d02bbf2ebe7c1177db (patch) | |
tree | fe0f4037e44cd33d5716d1a44930ed19ca3a34fc /modules/rest/helpers/rest.php | |
parent | e56473c5d78842210b7825300bd9b373c104cb83 (diff) | |
parent | ca977dce516b9e2ca9539db69fce188ed33d971c (diff) |
Merge branch 'master' into talmdal_dev
Conflicts:
modules/rest/controllers/rest.php
Diffstat (limited to 'modules/rest/helpers/rest.php')
-rw-r--r-- | modules/rest/helpers/rest.php | 12 |
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(); |