Skip to content

Commit

Permalink
Found another where statement that required converting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Almdal committed Dec 29, 2009
1 parent 02d3fe6 commit 7e8985d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/rest/helpers/rest_event.php
Expand Up @@ -23,8 +23,8 @@ class rest_event {
*/
static function user_before_delete($user) {
ORM::factory("user_access_token")
->where("id", $user->id)
->delete_all();
->where("id", "=", $user->id)
->delete_all();
}

/**
Expand Down Expand Up @@ -57,10 +57,10 @@ static function user_edit_form($user, $form) {
*/
static function _get_access_key_form($user, $form) {
$key = ORM::factory("user_access_token")
->where("user_id", $user->id)
->where("user_id", "=", $user->id)
->find();

if (!$key->loaded) {
if (!$key->loaded()) {
$key->user_id = $user->id;
$key->access_key = md5($user->name . rand());
$key->save();
Expand Down

0 comments on commit 7e8985d

Please sign in to comment.