summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/User.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-01-09 21:56:14 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-01-09 21:56:14 +0100
commit0c449e2d96804f6e48d3812b42ccf407fbbeb747 (patch)
treedfdd8c56789ff02c925b5b55e11faf890f1ecd98 /Bugzilla/WebService/User.pm
parentddf1fb2abb2a6266ce5a9cc525c84563c154df52 (diff)
parenta7785661b8e7dcb7a6914eebf1a11fd99f1cf037 (diff)
downloadbugzilla-0c449e2d96804f6e48d3812b42ccf407fbbeb747.tar.gz
bugzilla-0c449e2d96804f6e48d3812b42ccf407fbbeb747.tar.xz
merge with bugzilla/4.2
Diffstat (limited to 'Bugzilla/WebService/User.pm')
-rw-r--r--Bugzilla/WebService/User.pm26
1 files changed, 7 insertions, 19 deletions
diff --git a/Bugzilla/WebService/User.pm b/Bugzilla/WebService/User.pm
index 984f41c8a..1efe6179e 100644
--- a/Bugzilla/WebService/User.pm
+++ b/Bugzilla/WebService/User.pm
@@ -28,7 +28,6 @@ use Bugzilla::Error;
use Bugzilla::Group;
use Bugzilla::User;
use Bugzilla::Util qw(trim);
-use Bugzilla::Token;
use Bugzilla::WebService::Util qw(filter validate);
use Bugzilla::Hook;
@@ -92,19 +91,8 @@ 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/i) {
- ThrowUserError("account_creation_restricted");
- }
-
- $email = Bugzilla::User->check_login_name_for_creation($email);
-
- # Create and send a token for this new account.
- Bugzilla::Token::issue_new_user_account_token($email);
-
+ Bugzilla->user->check_account_creation_enabled;
+ Bugzilla->user->check_and_send_account_creation_confirmation($email);
return undef;
}
@@ -400,14 +388,14 @@ This is the recommended way to create a Bugzilla account.
=over
-=item 500 (Illegal Email Address)
+=item 500 (Account Already Exists)
-This Bugzilla does not allow you to create accounts with the format of
-email address you specified. Account creation may be entirely disabled.
+An account with that email address already exists in Bugzilla.
-=item 501 (Account Already Exists)
+=item 501 (Illegal Email Address)
-An account with that email address already exists in Bugzilla.
+This Bugzilla does not allow you to create accounts with the format of
+email address you specified. Account creation may be entirely disabled.
=back