summaryrefslogtreecommitdiffstats
path: root/application/models/muser.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-01-24 22:49:21 +0100
committerFlorian Pritz <bluewind@xinu.at>2013-01-24 22:49:21 +0100
commit2e491315a3def9ea3bd345c5a03121da8125d6c2 (patch)
tree2b1f36b25ddbdc36b997dda553f721d270d7f78c /application/models/muser.php
parentf75899e2fb9cded8cc41e9fe26c7f505a7355d9b (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/muser.php')
-rw-r--r--application/models/muser.php4
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