projects
/
speedfreak
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed minor bugs
[speedfreak]
/
Server
/
application
/
models
/
user.php
diff --git
a/Server/application/models/user.php
b/Server/application/models/user.php
index
fec78a2
..
749d0dc
100644
(file)
--- a/
Server/application/models/user.php
+++ b/
Server/application/models/user.php
@@
-106,7
+106,7
@@
class User_Model extends Model {
* @return integer|bool User id if successful or false
*/
public function get_id($username){
* @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
if ($result->count()>0)
return $result[0]->id;
else
@@
-138,7
+138,7
@@
class User_Model extends Model {
// hash password
$password = $this->hash($password);
// hash password
$password = $this->hash($password);
- if ($this->db->query("SELECT id FROM users WHERE username = ? AND password = ?",
+ if ($this->db->query("SELECT id FROM users WHERE username='?' AND password='?'",
$username, $password)->count()>0)
return true;
else
$username, $password)->count()>0)
return true;
else