From c99531decb96667331bf43db26187de840d00843 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 18 Jul 2022 16:15:22 +0200 Subject: [PATCH] Allow changing the username match pattern from the config --- includes/model/User_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/model/User_model.php b/includes/model/User_model.php index 4c08d4cc..9e800118 100644 --- a/includes/model/User_model.php +++ b/includes/model/User_model.php @@ -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); }