function captcha_validate_ignore_spaces in CAPTCHA 6.2
Same name and namespace in other branches
- 8 captcha.module \captcha_validate_ignore_spaces()
- 7 captcha.module \captcha_validate_ignore_spaces()
CAPTCHA validation function to tests equality while ignoring spaces.
Parameters
$solution the solution of the test.:
$response the response to the test.:
Return value
TRUE when equal (ignoring spaces), FALSE otherwise.
1 string reference to 'captcha_validate_ignore_spaces'
- image_captcha_captcha in image_captcha/
image_captcha.module - Implementation of hook_captcha().
File
- ./
captcha.module, line 487 - This module enables basic CAPTCHA functionality: administrators can add a CAPTCHA to desired forms that users without the 'skip CAPTCHA' permission (typically anonymous visitors) have to solve.
Code
function captcha_validate_ignore_spaces($solution, $response) {
return preg_replace('/\\s/', '', $solution) === preg_replace('/\\s/', '', $response);
}