Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
# User errors are 500-600.
account_exists => 500,
illegal_email_address => 501,
+ account_creation_disabled => 501,
password_too_short => 502,
password_too_long => 503,
invalid_username => 504,
my $email = trim($params->{email})
|| ThrowCodeError('param_required', { param => 'email' });
+ my $createexp = Bugzilla->params->{'createemailregexp'};
+ if (!$createexp || $email !~ /$createexp/) {
+ ThrowUserError("account_creation_disabled");
+ }
+
$email = Bugzilla::User->check_login_name_for_creation($email);
# Create and send a token for this new account.