From ceaa62caa90f39de04c5649c70d7902d58b1f3ed Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 26 May 2007 05:51:43 +0000 Subject: Bug 381732: Old tokens are not deleted on time when changing the email address - Patch by Frédéric Buclin r=mkanat a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- userprefs.cgi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'userprefs.cgi') diff --git a/userprefs.cgi b/userprefs.cgi index 564057ee8..8f94809cb 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -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 -- cgit v1.2.3-24-g4f1b