function _botcha_filter_value in BOTCHA Spam Prevention 7.2
Same name and namespace in other branches
- 7 botcha.botcha.inc \_botcha_filter_value()
- 7.3 botcha.module \_botcha_filter_value()
Filter out sensitive form data from values for logging.
3 calls to _botcha_filter_value()
- BotchaRecipebookAbstract::apply in controller/
botcha_recipebook.controller.inc - BotchaRecipebookAbstract::handle in controller/
botcha_recipebook.controller.inc - Handle form depending on the result of spam check.
- _botcha_filter_form_log in ./
botcha.inc - Filter out sensitive form data for logging Recursive.
File
- ./
botcha.inc, line 84 - General BOTCHA functionality and helper functions.
Code
function _botcha_filter_value($value) {
$filtered_value = $value;
if (is_string($value)) {
$filtered_value = '********';
}
elseif (is_array($value)) {
foreach ($value as $key => $key_value) {
// Filter out sensitive data.
if (in_array($key, array(
'pass',
'pass1',
'pass2',
'#value',
))) {
$filtered_value[$key] = _botcha_filter_value($key_value);
}
}
}
return $filtered_value;
}