function hook_honeypot_reject in Honeypot 7
Same name and namespace in other branches
- 8 honeypot.api.php \hook_honeypot_reject()
- 6 honeypot.api.php \hook_honeypot_reject()
- 2.0.x honeypot.api.php \hook_honeypot_reject()
React to the rejection of a form submission.
When honeypot rejects a form submission, it calls this hook with the form ID, the user ID (0 if anonymous) of the user that was disallowed from submitting the form, and the reason (type) for the rejection of the form submission.
Parameters
string $form_id: Form ID of the form the user was disallowed from submitting.
int $uid: 0 for anonymous users, otherwise the user ID of the user.
string $type: String indicating the reason the submission was blocked. Allowed values:
- honeypot: If honeypot field was filled in.
- honeypot_time: If form was completed before the configured time limit.
1 invocation of hook_honeypot_reject()
- honeypot_log_failure in ./
honeypot.module - Log the failed submision with timestamp and hostname.
File
- ./
honeypot.api.php, line 64 - API Functionality for Honeypot module.
Code
function hook_honeypot_reject($form_id, $uid, $type) {
if ($form_id == 'mymodule_form') {
// Do something...
}
}