Bug 381732: Old tokens are not deleted on time when changing the email address - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@227050 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -32,6 +32,7 @@ use Bugzilla::Search;
|
||||
use Bugzilla::Util;
|
||||
use Bugzilla::Error;
|
||||
use Bugzilla::User;
|
||||
use Bugzilla::Token;
|
||||
|
||||
my $template = Bugzilla->template;
|
||||
local our $vars = {};
|
||||
@@ -51,6 +52,9 @@ sub DoAccount {
|
||||
|
||||
if(Bugzilla->params->{'allowemailchange'}
|
||||
&& Bugzilla->user->authorizer->can_change_email) {
|
||||
# First delete old tokens.
|
||||
Bugzilla::Token::CleanTokenTable();
|
||||
|
||||
my @token = $dbh->selectrow_array(
|
||||
"SELECT tokentype, issuedate + " .
|
||||
$dbh->sql_interval(MAX_TOKEN_AGE, 'DAY') . ", eventdata
|
||||
|
||||
Reference in New Issue
Block a user