aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-05-26 05:51:43 +0000
committerlpsolit%gmail.com <>2007-05-26 05:51:43 +0000
commitceaa62caa90f39de04c5649c70d7902d58b1f3ed (patch)
tree9ba441b6dcb8bc01eb8c46d28d8e8ddf9beb6294 /userprefs.cgi
parentBug 382037: Default CC is ignored when a bug is created via the webservice (diff)
downloadbugzilla-ceaa62caa90f39de04c5649c70d7902d58b1f3ed.tar.gz
bugzilla-ceaa62caa90f39de04c5649c70d7902d58b1f3ed.tar.bz2
bugzilla-ceaa62caa90f39de04c5649c70d7902d58b1f3ed.zip
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
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi4
1 files changed, 4 insertions, 0 deletions
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