Fix username validation in account edit
This commit is contained in:
parent
bf8a87ff30
commit
b2c7df32eb
|
|
@ -65,7 +65,7 @@ abstract class FormData
|
||||||
{
|
{
|
||||||
$username = self::validateMailAddress($username, $required, 'Username');
|
$username = self::validateMailAddress($username, $required, 'Username');
|
||||||
|
|
||||||
if (strpos($username, '%') !== false) {
|
if ($username !== null && strpos($username, '%') !== false) {
|
||||||
throw new InputValidationError('Username must not contain the wildcard character "%" (use a wildcard alias instead).');
|
throw new InputValidationError('Username must not contain the wildcard character "%" (use a wildcard alias instead).');
|
||||||
}
|
}
|
||||||
return $username;
|
return $username;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue