]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 381732: Old tokens are not deleted on time when changing the email address -...
authorlpsolit%gmail.com <>
Sat, 26 May 2007 05:54:33 +0000 (05:54 +0000)
committerlpsolit%gmail.com <>
Sat, 26 May 2007 05:54:33 +0000 (05:54 +0000)
userprefs.cgi

index 564057ee89e83363a903b09eb1fb71dd3cffefec..8f94809cb786bee88dda4696403e0cf3120c920d 100755 (executable)
@@ -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