Merge pull request #453 from typal/issue-452

add check for non alpa/-/_ chars
This commit is contained in:
Sebastian Grewe 2013-07-13 10:17:03 -07:00
commit 92c94e8de5

View File

@ -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;