Same name and namespace in other branches
- 4.6.x includes/common.inc \flood_register_event()
- 4.7.x includes/common.inc \flood_register_event()
- 6.x includes/common.inc \flood_register_event()
- 7.x includes/common.inc \flood_register_event()
Register an event for the current visitor (hostname/IP) to the flood control mechanism.
Parameters
$name: The name of the event.
Related topics
2 calls to flood_register_event()
- contact_mail_page_submit in modules/
contact/ contact.module - Process the site-wide contact page form submission.
- contact_mail_user_submit in modules/
contact/ contact.module - Process the personal contact page form submission.
File
- includes/
common.inc, line 961 - Common functions that many Drupal modules will need to reference.
Code
function flood_register_event($name) {
db_query("INSERT INTO {flood} (event, hostname, timestamp) VALUES ('%s', '%s', %d)", $name, $_SERVER['REMOTE_ADDR'], time());
}