diff options
-rwxr-xr-x | userprefs.cgi | 4 |
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 |