diff --git a/app/Controllers/Api/Register.php b/app/Controllers/Api/Register.php index 3940e4a..577ba9a 100644 --- a/app/Controllers/Api/Register.php +++ b/app/Controllers/Api/Register.php @@ -36,8 +36,8 @@ class Register $username = $_POST['username']; $password = $_POST['password']; $email = $_POST['email']; - if (!strcasecmp(DB::query('SELECT username FROM users WHERE (LOWER(username) LIKE :username)', array(':username' => '%' . $username . '%'))[0]['username'], $username) === false || Router::checkCurl($_SERVER['HTTP_HOST'] . '/' . $username) != 200 ) { - if (Word::strlen(ltrim($username)) >= 5 && Word::strlen(ltrim($username)) <= 20 && !preg_match("#^[a-zA-Z0-9]+$#", $username)) { + if (!strcasecmp(DB::query('SELECT username FROM users WHERE (LOWER(username) LIKE :username)', array(':username' => '%' . $username . '%'))[0]['username'], $username) === false) { + if (Word::strlen(ltrim($username)) >= 5 && Word::strlen(ltrim($username)) <= 20) { if (Word::strlen(ltrim($password)) >= 5 && Word::strlen(ltrim($password)) <= 120) { diff --git a/views/components/Navbar.php b/views/components/Navbar.php index 53097f5..b9ff55d 100644 --- a/views/components/Navbar.php +++ b/views/components/Navbar.php @@ -1,44 +1,6 @@