You are here

function captcha_validate_case_insensitive_equality in CAPTCHA 6.2

Same name and namespace in other branches
  1. 8 captcha.module \captcha_validate_case_insensitive_equality()
  2. 7 captcha.module \captcha_validate_case_insensitive_equality()

CAPTCHA validation function to tests case insensitive equality.

Parameters

$solution the solution of the test.:

$response the response to the test.:

Return value

TRUE when case insensitive equal, FALSE otherwise.

1 string reference to 'captcha_validate_case_insensitive_equality'
captcha_elements in ./captcha.module
Implementation of hook_elements().

File

./captcha.module, line 477
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_case_insensitive_equality($solution, $response) {
  return drupal_strtolower($solution) === drupal_strtolower($response);
}