diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-18 21:49:26 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-18 21:49:26 -0700 |
commit | 239da247863fb1cb5511ea557cf84dd780071be5 (patch) | |
tree | a603a16540702c37eecad4031597568b0bbaa19c /modules/rest/helpers | |
parent | e40b2371ee4cc2756d80b36042124c71f21bc353 (diff) | |
parent | 9b788674275c843947d44934a50dd395b515737a (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/rest/helpers')
-rw-r--r-- | modules/rest/helpers/rest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php index b382cb29..0bad58f6 100644 --- a/modules/rest/helpers/rest.php +++ b/modules/rest/helpers/rest.php @@ -66,9 +66,9 @@ class rest_Core { identity::set_active_user($user); } - static function get_access_key($user_id) { + static function access_key() { $key = ORM::factory("user_access_key") - ->where("user_id", "=", $user_id) + ->where("user_id", "=", identity::active_user()->id) ->find(); if (!$key->loaded()) { @@ -76,7 +76,8 @@ class rest_Core { $key->access_key = md5(md5(uniqid(mt_rand(), true) . access::private_key())); $key->save(); } - return $key; + + return $key->access_key; } /** |