Merge pull request #453 from typal/issue-452
add check for non alpa/-/_ chars
This commit is contained in:
commit
92c94e8de5
@ -455,6 +455,10 @@ class User {
|
||||
$this->setErrorMessage('Username exceeding character limit');
|
||||
return false;
|
||||
}
|
||||
if (!preg_match('/[^a-zA-Z0-9_\-]/', $username)) {
|
||||
$this->setErrorMessage('Username may only contain alphanumeric characters');
|
||||
return false;
|
||||
}
|
||||
if ($this->getEmail($email1)) {
|
||||
$this->setErrorMessage( 'This e-mail address is already taken' );
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user