diff options
author | bbaetz%acm.org <> | 2003-09-14 15:04:38 +0200 |
---|---|---|
committer | bbaetz%acm.org <> | 2003-09-14 15:04:38 +0200 |
commit | 4e7e3310242bd5264b5f48e4bf3c387e59288b85 (patch) | |
tree | df9878685199a51358c148c1531d51116f32f650 /Bugzilla/Auth | |
parent | 95791d4b9edc26cd55483e71970d9f743f12f094 (diff) | |
download | bugzilla-4e7e3310242bd5264b5f48e4bf3c387e59288b85.tar.gz bugzilla-4e7e3310242bd5264b5f48e4bf3c387e59288b85.tar.xz |
Bug 208699 - Move Throw{Code,Template}Error into Error.pm
r,a=justdave
Diffstat (limited to 'Bugzilla/Auth')
-rw-r--r-- | Bugzilla/Auth/CGI.pm | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Bugzilla/Auth/CGI.pm b/Bugzilla/Auth/CGI.pm index 3588b7037..e223c9fee 100644 --- a/Bugzilla/Auth/CGI.pm +++ b/Bugzilla/Auth/CGI.pm @@ -32,6 +32,7 @@ use strict; use Bugzilla::Config; use Bugzilla::Constants; +use Bugzilla::Error; use Bugzilla::Util; sub login { @@ -102,12 +103,12 @@ sub login { # An error may have occurred with the login mechanism if ($authres == AUTH_ERROR) { - $::vars->{'authmethod'} = lc($authmethod); - $::vars->{'userid'} = $userid; - $::vars->{'auth_err_tag'} = $extra; - $::vars->{'info'} = $info; - - &::ThrowCodeError("auth_err"); + ThrowCodeError("auth_err", + { authmethod => lc($authmethod), + userid => $userid, + auth_err_tag => $extra, + info => $info + }); } # We can load the page if the login was ok, or there was no data @@ -134,7 +135,7 @@ sub login { 'caneditaccount' => Bugzilla::Auth->can_edit, } ) - || &::ThrowTemplateError($template->error()); + || ThrowTemplateError($template->error()); # This seems like as good as time as any to get rid of old # crufty junk in the logincookies table. Get rid of any entry @@ -150,7 +151,7 @@ sub login { # the password was just wrong. (This makes it harder for a cracker # to find account names by brute force) if ($authres == AUTH_LOGINFAILED) { - &::ThrowUserError("invalid_username_or_password"); + ThrowUserError("invalid_username_or_password"); } # The account may be disabled @@ -163,16 +164,16 @@ sub login { -expires => "Tue, 15-Sep-1998 21:49:00 GMT"); # and throw a user error - &::ThrowUserError("account_disabled", - {'disabled_reason' => $extra}); + ThrowUserError("account_disabled", + {'disabled_reason' => $extra}); } # If we get here, then we've run out of options, which shouldn't happen - &::ThrowCodeError("authres_unhandled", - { authres => $authres, - type => $type, - } - ); + ThrowCodeError("authres_unhandled", + { authres => $authres, + type => $type, + } + ); } |