diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2011-08-17 00:45:22 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2011-08-17 00:45:22 +0200 |
commit | e15dcf488f8bbf1fef2cd0a7001385f7a95e8d59 (patch) | |
tree | 4a46e8d94f53faf98923ca7509704f5e1fdec541 /userprefs.cgi | |
parent | 7a8598938d6976acb5f6bde6c86be8b65d1df8da (diff) | |
download | bugzilla-e15dcf488f8bbf1fef2cd0a7001385f7a95e8d59.tar.gz bugzilla-e15dcf488f8bbf1fef2cd0a7001385f7a95e8d59.tar.xz |
Bug 678970: Use $user and $cgi instead of Bugzilla->user and Bugzilla->cgi
r=timello a=LpSolit
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-x | userprefs.cgi | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/userprefs.cgi b/userprefs.cgi index f411326a2..485ceb54f 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -51,8 +51,7 @@ sub DoAccount { ($vars->{'realname'}) = $dbh->selectrow_array( "SELECT realname FROM profiles WHERE userid = ?", undef, $user->id); - if(Bugzilla->params->{'allowemailchange'} - && Bugzilla->user->authorizer->can_change_email) { + if (Bugzilla->params->{'allowemailchange'} && $user->authorizer->can_change_email) { # First delete old tokens. Bugzilla::Token::CleanTokenTable(); @@ -493,9 +492,9 @@ $cgi->delete('Bugzilla_login', 'Bugzilla_password') if ($cgi->cookie('sudo')); $cgi->delete('GoAheadAndLogIn'); # First try to get credentials from cookies. -Bugzilla->login(LOGIN_OPTIONAL); +my $user = Bugzilla->login(LOGIN_OPTIONAL); -if (!Bugzilla->user->id) { +if (!$user->id) { # Use credentials given in the form if login cookies are not available. $cgi->param('Bugzilla_login', $cgi->param('old_login')); $cgi->param('Bugzilla_password', $cgi->param('old_password')); |