You are here

function _login_security_remove_all_events in Login Security 7

Same name and namespace in other branches
  1. 8 login_security.module \_login_security_remove_all_events()
  2. 6 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

int $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
Clean login_security_track table.
_login_security_remove_events in ./login_security.module
Remove tracked events or expire old ones.

File

./login_security.module, line 342
Login Security

Code

function _login_security_remove_all_events($time = NULL) {

  // Remove selected events.
  if (empty($time)) {
    $time = REQUEST_TIME;
  }
  $result = db_delete('login_security_track')
    ->condition('timestamp', $time, '<')
    ->execute();
}