summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/User.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-05-12 20:39:23 +0200
committerDavid Lawrence <dkl@mozilla.com>2014-05-12 20:40:47 +0200
commit52b113cc1a6a208744ec92ad1b2c91d463ff9202 (patch)
treef9b40aaf18ee98a0cc474f7aeb318db97edb6535 /Bugzilla/WebService/User.pm
parentd694e688d2b129e6091ee5045066f09f4578f14e (diff)
downloadbugzilla-52b113cc1a6a208744ec92ad1b2c91d463ff9202.tar.gz
bugzilla-52b113cc1a6a208744ec92ad1b2c91d463ff9202.tar.xz
Backout of Bug 1001462 - Bug.search causes error when using simple token auth and specifying 'token' instead of 'Bugzilla_token'
Diffstat (limited to 'Bugzilla/WebService/User.pm')
-rw-r--r--Bugzilla/WebService/User.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/WebService/User.pm b/Bugzilla/WebService/User.pm
index 112d336d7..f8358f78d 100644
--- a/Bugzilla/WebService/User.pm
+++ b/Bugzilla/WebService/User.pm
@@ -54,10 +54,16 @@ sub login {
# Username and password params are required
foreach my $param ("login", "password") {
- (!defined $params->{$param} && !defined $params->{'Bugzilla_' . $param})
+ defined $params->{$param}
|| ThrowCodeError('param_required', { param => $param });
}
+ # Make sure the CGI user info class works if necessary.
+ my $input_params = Bugzilla->input_params;
+ $input_params->{'Bugzilla_login'} = $params->{login};
+ $input_params->{'Bugzilla_password'} = $params->{password};
+ $input_params->{'Bugzilla_restrictlogin'} = $params->{restrict_login};
+
my $user = Bugzilla->login();
my $result = { id => $self->type('int', $user->id) };