We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 49580259 authored by jurgbohn's avatar jurgbohn

Regexp on valid usernames; ^[a-zA-Z0-9_]{1,}$

parent cd3235fd
......@@ -44,8 +44,8 @@ if(isset($_POST['register'])) {
//Basic validation
if(empty($username)) {
$errors .= "You must enter a username.<br />";
if(!preg_match("/^[a-zA-Z0-9_]{1,}$/", $username)) {
$errors .= "Your username must be atleast 1 character in length and only consist of <i>a-z, A-Z, 0-9</i> and _ (underscore).<br />";
}
if(empty($password)) {
$errors .= "You must enter a password.<br />";
......
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