Floodcontrol Settings API
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
What is this module?
If you want to extend Drupal core's flood control mechanism to your custom forms then
this module is the correct choice. Simply you need to implement hook_floodcontrol_settings in your custom module.
This module also provides an UI to clear "flood" table.
Background information on why we might need this module.
Drupal provides three core functions to protect forms against flooding.
flood_register_event Registers an event for the current visitor to the flood control mechanism.
flood_is_allowed Checks whether a user is allowed to proceed with the specified event.
flood_clear_event Makes the flood control mechanism forget an event for the current visitor.
Reference:
https://api.drupal.org/api/drupal/includes%21common.inc/7.x
https://drupal.stackexchange.com/questions/168104/how-to-extend-flood-co...
The contact form,login forms in Drupal core are examples of forms which are protected against
flood control using above functions.
You may want to extend this flood control mechanism to your custom forms.
You may also want to configure the limit and time windows in Drupal admin panel to control the flooding.
This lightweight module provides an blank UI and an API to configure your own flood control variables.
The UI is populated with your own flood control settings when you implement the floodcontrol_settings API.
How to extend the floodcontrol_settings API
See floodcontrol_settings_api.api.php for more details and an example.
Where is the UI?
1. Go to admin/config/system/floodcontrol-settings-api to see the settings
(Initially it is empty. You need to implement hook_floodcontrol_settings for your custom form)
2. Go to admin/config/system/floodcontrol-settings-api/clear-flood to clear the flood table.
@TODO: add event based and identified based flood table clearance.