You are here

function tfa_cron in Two-factor Authentication (TFA) 7

Same name and namespace in other branches
  1. 6 tfa.module \tfa_cron()

Implements hook_cron().

File

./tfa.module, line 67
Two-factor authentication for Drupal.

Code

function tfa_cron() {

  // Remove entries from the tfa table that are older than 1 day.
  $num_deleted = db_delete('tfa')
    ->condition('created', REQUEST_TIME - variable_get('tfa_code_ttl', 86400), '<')
    ->execute();
}