X-Git-Url: http://git.maemo.org/git/?p=speedfreak;a=blobdiff_plain;f=Server%2Fapplication%2Fmodels%2Fuser.php;fp=Server%2Fapplication%2Fmodels%2Fuser.php;h=30723bcfa7d2b81d2b842744f8ebf9125ca82790;hp=053578975b4aa328094b4555ad15b6a94ba0a82f;hb=62b557820f57a3ae57ec5e7e08add79172f0436e;hpb=41b45c9bb601932559db4a51f602d3c26fe7133d diff --git a/Server/application/models/user.php b/Server/application/models/user.php index 0535789..30723bc 100644 --- a/Server/application/models/user.php +++ b/Server/application/models/user.php @@ -82,7 +82,7 @@ class User_Model extends Model { * @return bool Returns True if user exists and false otherwise */ private function user_exists($username, $email){ - if ($this->db->query("SELECT id FROM users WHERE username='?' OR email='?'", + if ($this->db->query("SELECT id FROM users WHERE username=? OR email='?'", $username, $email)->count()>0) return true; else @@ -106,7 +106,7 @@ class User_Model extends Model { * @return integer|bool User id if successful or false */ public function get_id($username){ - $result = $this->db->query("SELECT id FROM users WHERE username='?'", $username); + $result = $this->db->query("SELECT id FROM users WHERE username=?", $username); if ($result->count()>0) return $result[0]->id; else