You are here

function persistent_login_cron in Persistent Login 6

Same name and namespace in other branches
  1. 8 persistent_login.module \persistent_login_cron()
  2. 5 persistent_login.module \persistent_login_cron()
  3. 7 persistent_login.module \persistent_login_cron()

Implementation of hook_cron().

File

./persistent_login.module, line 266
Provide a "Remember Me" checkbox in the login form.

Code

function persistent_login_cron() {
  _persistent_login_invalidate('cron', 'expires > 0 AND expires < %d', time());

  // Remove old login invalidation history
  if (0 < ($history_days = variable_get('persistent_login_history', 0))) {
    db_query('DELETE FROM {persistent_login_history} WHERE at < %d', time() - 86400 * $history_days);
  }
}