function _honeypot_log in Honeypot 6
Same name and namespace in other branches
- 8 honeypot.module \_honeypot_log()
- 7 honeypot.module \_honeypot_log()
- 2.0.x honeypot.module \_honeypot_log()
Log blocked form submissions.
Parameters
string $form_id: Form ID for the form on which submission was blocked.
string $type: String indicating the reason the submission was blocked. Allowed values:
- 'honeypot'
- 'honeypot_time'
2 calls to _honeypot_log()
- _honeypot_honeypot_validate in ./
honeypot.module - Validate honeypot field.
- _honeypot_time_restriction_validate in ./
honeypot.module - Validate honeypot's time restriction field.
File
- ./
honeypot.module, line 244 - Honeypot module, for deterring spam bots from completing Drupal forms.
Code
function _honeypot_log($form_id, $type) {
honeypot_log_failure($form_id, $type);
if (variable_get('honeypot_log', 0)) {
$variables = array(
'%form' => $form_id,
'@cause' => $type == 'honeypot' ? t('submission of a value in the honeypot field') : t('submission of the form in less than minimum required time'),
);
watchdog('honeypot', 'Blocked submission of %form due to @cause.', $variables);
}
}