You are here

function _login_security_remove_all_events in Login Security 6

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

Remove all tracked events up to a date..

Parameters

$time: if specified, events up to this timestamp will be deleted. If not specified, all elements up to current timestamp will be deleted.

2 calls to _login_security_remove_all_events()
_login_security_clean_tracked_events in ./login_security.admin.inc
_login_security_remove_events in ./login_security.module
Remove tracked events or expire old ones.

File

./login_security.module, line 263
Login Security

Code

function _login_security_remove_all_events($time = NULL) {

  // Remove selected events
  if (empty($time)) {
    $time = time();
  }
  db_query("DELETE FROM {login_security_track} WHERE timestamp < %d", $time);
  return;
}