function flood_clear_event in Drupal 7
Makes the flood control mechanism forget an event for the current visitor.
Parameters
$name: The name of an event.
$identifier: Optional identifier (defaults to the current user's IP address).
2 calls to flood_clear_event()
- user_login_final_validate in modules/
user/ user.module - The final validation handler on the login form.
- user_pass_reset in modules/
user/ user.pages.inc - Menu callback; process one time login link and redirects to the user page on success.
File
- includes/
common.inc, line 1331 - Common functions that many Drupal modules will need to reference.
Code
function flood_clear_event($name, $identifier = NULL) {
if (!isset($identifier)) {
$identifier = ip_address();
}
db_delete('flood')
->condition('event', $name)
->condition('identifier', $identifier)
->execute();
}