Fix username validation in account edit
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Lexi / Zoe 2022-01-04 01:33:51 +01:00
parent bf8a87ff30
commit b2c7df32eb
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
1 changed files with 1 additions and 1 deletions

View File

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