You are here

function riddler_captcha in Captcha Riddler 5

Same name and namespace in other branches
  1. 8 riddler.module \riddler_captcha()
  2. 6 riddler.module \riddler_captcha()
  3. 7 riddler.module \riddler_captcha()

File

./riddler.module, line 90

Code

function riddler_captcha($op, $captcha_type = '', $answer = '') {
  switch ($op) {
    case 'list':
      return array(
        "Riddler",
      );
      break;
    case 'generate':
      $result = array();
      if ($captcha_type == "Riddler") {
        $result = riddler_form();
      }
      return $result;
      break;

    // Answers changed to lowercase for case insensitivity
    case 'preprocess':
      $answer_lo = strtolower($answer);
      return $answer_lo;
      break;
  }
}