Disable Captcha
  • We have an Airtime instance in a local network, without Internet access. After update (from 2.3.x to 2.5.1) Captcha started to appear, but as the server don't have internet connection it fails because cannot validate.

    There is any way to disable captcha?

    Regards
  • 1 Comment sorted by
  • Hi,

    Although I do not recall seeing a setting for it in the GUI, There is a way to disable the captcha but it will require a couple of source file edits (and most likely will not be persistent across updates). First, edit lines 40-42 in airtime_mvc/application/controllers/LoginController.php from:

                if (array_key_exists('recaptcha_response_field', $request->getPost())) {
                    $form->addRecaptcha();
                }

    to:

                //if (array_key_exists('recaptcha_response_field', $request->getPost())) {
                //    $form->addRecaptcha();
                //}

    Then, edit lines 60 to 62 of airtime_mvc/application/forms/Login.php from:

            if (Application_Model_LoginAttempts::getAttempts($_SERVER['REMOTE_ADDR']) >= 3) {
                $this->addRecaptcha();
            }

    to:

            //if (Application_Model_LoginAttempts::getAttempts($_SERVER['REMOTE_ADDR']) >= 3) {
            //    $this->addRecaptcha();
            //}


    This should stop airtime displaying and verifying the Captcha. WARNING: This code is un-tested at the very least make backups of the files being changed. 

    Thanks,
    Marcus