aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CatDap/Controller/register.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CatDap/Controller/register.pm')
-rw-r--r--lib/CatDap/Controller/register.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CatDap/Controller/register.pm b/lib/CatDap/Controller/register.pm
index 1aef176..2ef3fce 100644
--- a/lib/CatDap/Controller/register.pm
+++ b/lib/CatDap/Controller/register.pm
@@ -39,7 +39,8 @@ sub check : Local {
my @errors;
$c->stash(errors => []);
# Check username, start with letter, followed by letters or numbers
- if ($username !~ /^[a-z][a-z0-9_-]*$/) {
+ my $login_regex = ${$c->config}{'register'}{'login_regex'};
+ if ($username !~ /$login_regex/) {
push @errors, $c->loc('Invalid username');
}
my $email = $c->request->params->{mail1};