diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2011-08-17 14:53:36 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2011-08-17 14:53:36 +0200 |
commit | e7d28afbc4990c564be08f77cc472f92962f8f45 (patch) | |
tree | 4a96db9bf5eccb0954e505c02e38dbaca8af1e89 /Bugzilla/Token.pm | |
parent | 45a4eea5b94d5a90aa83014c51366d42c39ed746 (diff) | |
download | bugs-e7d28afbc4990c564be08f77cc472f92962f8f45.tar bugs-e7d28afbc4990c564be08f77cc472f92962f8f45.tar.gz bugs-e7d28afbc4990c564be08f77cc472f92962f8f45.tar.bz2 bugs-e7d28afbc4990c564be08f77cc472f92962f8f45.tar.xz bugs-e7d28afbc4990c564be08f77cc472f92962f8f45.zip |
Bug 677522: IssueEmailChangeToken() should get the old login name from the user object
r=timello a=LpSolit
Diffstat (limited to 'Bugzilla/Token.pm')
-rw-r--r-- | Bugzilla/Token.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm index da4e91e22..36b3b070f 100644 --- a/Bugzilla/Token.pm +++ b/Bugzilla/Token.pm @@ -92,8 +92,9 @@ sub issue_new_user_account_token { } sub IssueEmailChangeToken { - my ($user, $old_email, $new_email) = @_; + my ($user, $new_email) = @_; my $email_suffix = Bugzilla->params->{'emailsuffix'}; + my $old_email = $user->login; my ($token, $token_ts) = _create_token($user->id, 'emailold', $old_email . ":" . $new_email); @@ -445,7 +446,7 @@ Bugzilla::Token - Provides different routines to manage tokens. use Bugzilla::Token; Bugzilla::Token::issue_new_user_account_token($login_name); - Bugzilla::Token::IssueEmailChangeToken($user, $old_email, $new_email); + Bugzilla::Token::IssueEmailChangeToken($user, $new_email); Bugzilla::Token::IssuePasswordToken($user); Bugzilla::Token::DeletePasswordTokens($user_id, $reason); Bugzilla::Token::Cancel($token, $cancelaction, $vars); @@ -476,7 +477,7 @@ Bugzilla::Token - Provides different routines to manage tokens. Returns: Nothing. It throws an error if the same user made the same request in the last few minutes. -=item C<sub IssueEmailChangeToken($user, $old_email, $new_email)> +=item C<sub IssueEmailChangeToken($user, $new_email)> Description: Sends two distinct tokens per email to the old and new email addresses to confirm the email address change for the given @@ -484,7 +485,6 @@ Bugzilla::Token - Provides different routines to manage tokens. Params: $user - User object of the user requesting a new email address. - $old_email - The current (old) email address of the user. $new_email - The new email address of the user. Returns: Nothing. |