diff options
Diffstat (limited to 'Bugzilla/WebService/User.pm')
-rwxr-xr-x | Bugzilla/WebService/User.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/WebService/User.pm b/Bugzilla/WebService/User.pm index db02ff75a..f839e2a9d 100755 --- a/Bugzilla/WebService/User.pm +++ b/Bugzilla/WebService/User.pm @@ -74,6 +74,14 @@ sub offer_account_by_email { my $email = trim($params->{email}) || ThrowCodeError('param_required', { param => 'email' }); + my $createexp = Bugzilla->params->{'createemailregexp'}; + if (!$createexp) { + ThrowUserError("account_creation_disabled"); + } + elsif ($email !~ /$createexp/) { + ThrowUserError("account_creation_restricted"); + } + $email = Bugzilla::User->check_login_name_for_creation($email); # Create and send a token for this new account. |