Add list of reserved usernames

This commit is contained in:
2022-07-31 21:07:52 +02:00
parent bb247d295c
commit ee9f0b0714
2 changed files with 5 additions and 0 deletions

View File

@ -47,7 +47,11 @@ if ( isset( $_POST[ 'user' ] ) ) {
if ( ! $validator->isValid( "$user@$domain", new NoRFCWarningsValidation() ) ) {
$ok = false;
$msg .= '<div class="red" role="alert">The email address you specified is not valid</div>';
} elseif(in_array($user, RESERVED_USERNAMES, true)){
$ok = false;
$msg .= '<div class="red" role="alert">The user name you specified is reserved</div>';
}
}
}
if ( $ok ) {