diff options
author | David Lawrence <dlawrence@mozilla.com> | 2011-08-22 19:21:08 +0200 |
---|---|---|
committer | David Lawrence <dlawrence@mozilla.com> | 2011-08-22 19:21:08 +0200 |
commit | 9344a458c830ba066b9004c301d0fc6cabc8f229 (patch) | |
tree | ff06e420d70da1459af478c2619fb18900591d5c /userprefs.cgi | |
parent | f30b939630917a63bc733e3963869643eeccdc90 (diff) | |
parent | dd7eacbef2571efe55e5b18d80e93837dc6619d1 (diff) | |
download | bugzilla-9344a458c830ba066b9004c301d0fc6cabc8f229.tar.gz bugzilla-9344a458c830ba066b9004c301d0fc6cabc8f229.tar.xz |
merged with bugzilla/4.2
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-x | userprefs.cgi | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/userprefs.cgi b/userprefs.cgi index f411326a2..94fe1def2 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -84,8 +84,6 @@ sub SaveAccount { my $oldpassword = $cgi->param('old_password'); my $pwd1 = $cgi->param('new_password1'); my $pwd2 = $cgi->param('new_password2'); - - my $old_login_name = $user->login; my $new_login_name = trim($cgi->param('new_login_name')); if ($user->authorizer->can_change_password @@ -119,7 +117,7 @@ sub SaveAccount { && Bugzilla->params->{"allowemailchange"} && $new_login_name) { - if ($old_login_name ne $new_login_name) { + if ($user->login ne $new_login_name) { $oldpassword || ThrowUserError("old_password_required"); # Block multiple email changes for the same user. @@ -133,8 +131,7 @@ sub SaveAccount { is_available_username($new_login_name) || ThrowUserError("account_exists", {email => $new_login_name}); - Bugzilla::Token::IssueEmailChangeToken($user, $old_login_name, - $new_login_name); + Bugzilla::Token::IssueEmailChangeToken($user, $new_login_name); $vars->{'email_changes_saved'} = 1; } |