You are here

function login_security_cron in Login Security 5

Same name and namespace in other branches
  1. 8 login_security.module \login_security_cron()
  2. 6 login_security.module \login_security_cron()
  3. 7 login_security.module \login_security_cron()
  4. 2.x login_security.module \login_security_cron()

Implementation of hook_cron().

File

./login_security.module, line 28
Login Security

Code

function login_security_cron() {

  // calc expiring time of login security tracked entries
  $time = time() - variable_get('login_security_track_time', LOGIN_SECURITY_TRACK_TIME) * 3600;
  db_query("DELETE FROM {login_security_track} WHERE timestamp < '%d'", $time);
  return;
}