Commit 5d98d558 authored by Florian Pritz's avatar Florian Pritz
Browse files

Fix incorrect username validation


Signed-off-by: default avatarFlorian Pritz <bluewind@xinu.at>
parent 8fbcc098
...@@ -624,7 +624,7 @@ class User extends MY_Controller { ...@@ -624,7 +624,7 @@ class User extends MY_Controller {
*/ */
private function valid_username($username) 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);
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment