function riddler_captcha_validate in Captcha Riddler 7
Same name and namespace in other branches
- 8 riddler.module \riddler_captcha_validate()
- 6 riddler.module \riddler_captcha_validate()
Custom captcha validation.
Parameters
$solution: Comma-separated string of acceptable answers.
$response: User enter answer to match agains solution.
Return value
TRUE if the response is found in the solution, or FALSE.
1 string reference to 'riddler_captcha_validate'
- riddler_captcha in ./
riddler.module - Implementation of hook_captcha().
File
- ./
riddler.module, line 261 - Adds a question and answer type to the Captcha module.
Code
function riddler_captcha_validate($solution, $response) {
$solution = str_ireplace(',', ' ', $solution);
$solution = explode(' ', $solution);
return in_array(drupal_strtolower($response), $solution);
}