Allow changing the username match pattern from the config

This commit is contained in:
Igor Scheller 2022-07-18 16:15:22 +02:00
parent a8f064b9cd
commit c99531decb
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ function User_validate_Nick($nick)
if (strlen($nick) == 0 || strlen($nick) > 24) {
return new ValidationResult(false, $nick);
}
if (preg_match('/([^\p{L}\p{N}\-_. ]+)/ui', $nick)) {
if (preg_match(config('username_regex', '/([^\p{L}\p{N}\-_. ]+)/ui'), $nick)) {
return new ValidationResult(false, $nick);
}