diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-01-24 22:49:21 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-01-24 22:49:21 +0100 |
commit | 2e491315a3def9ea3bd345c5a03121da8125d6c2 (patch) | |
tree | 2b1f36b25ddbdc36b997dda553f721d270d7f78c /application/models | |
parent | f75899e2fb9cded8cc41e9fe26c7f505a7355d9b (diff) |
m/user/username_exists: fix bug on empty/false argument
username_exists(false) returned true because the condition matches any
existing user.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/models')
-rw-r--r-- | application/models/muser.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/application/models/muser.php b/application/models/muser.php index 657c0bfc9..ee086994d 100644 --- a/application/models/muser.php +++ b/application/models/muser.php @@ -127,6 +127,10 @@ class Muser extends CI_Model { function username_exists($username) { + if ($username === false) { + return false; + } + $query = $this->db->query(" SELECT id FROM users |