summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-07-14 10:43:13 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-07-14 10:43:13 +0200
commit5d98d558c6a7fae8111f90552c9fb86a246b9d91 (patch)
tree830d2be007702cfcb89811c9fb8c3a35ad1df580
parent8fbcc098204e0cff88743b48c01147f4a1f4c2c5 (diff)
Fix incorrect username validation0.9.17
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/controllers/user.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php
index 5d506f9d7..f0426943b 100644
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -624,7 +624,7 @@ class User extends MY_Controller {
*/
private function valid_username($username)
{
- return !$username || strlen($username) > 32 || !preg_match("/^[a-z0-9]+$/", $username);
+ return strlen($username) <= 32 && preg_match("/^[a-z0-9]+$/", $username);
}
/**