From 6f9d1440851bc3ac5e7e59f00a46fd3f8d1954a8 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Sat, 26 May 2007 00:54:33 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20381732:=20Old=20tokens=20are=20not=20dele?= =?UTF-8?q?ted=20on=20time=20when=20changing=20the=20email=20address=20-?= =?UTF-8?q?=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r=3Dmkanat=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@227050 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/userprefs.cgi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mozilla/webtools/bugzilla/userprefs.cgi b/mozilla/webtools/bugzilla/userprefs.cgi index 564057ee89e..8f94809cb78 100755 --- a/mozilla/webtools/bugzilla/userprefs.cgi +++ b/mozilla/webtools/bugzilla/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