Author Topic: Adding breakChainOnFailure  (Read 1191 times)

0 Members and 1 Guest are viewing this topic.

Offline milesapTopic starter

  • Enthusiast
  • Posts: 64
    • View Profile
Adding breakChainOnFailure
« on: March 10, 2009, 08:17:40 PM »
Quick question for anyone who has implemented breakChainOnFailure to a validator in their forms. There is little documentation on this, however I would like to add a breakChainOnFailure to my reCaptcha. I want to do this because if someone incorrectly answers the reCaptcha I don't want to reveal if the username or password is correct which would weaken the security of having a reCaptcha in the first place.

Anyways here's the reCaptcha code I'm using now which works great:

Code: [Select]
$captcha = new Zend_Form_Element_Captcha('securityCheck', array(  
        'captcha' => 'ReCaptcha',
        'disableLoadDefaultDecorators' => TRUE,
        'captchaOptions' => array(  
        'captcha' => 'ReCaptcha',  
        'privKey' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
        'pubKey' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
        )));
       
        $this->addElement($captcha);
        $this->getElement('securityCheck')->getCaptcha()->getService()
        ->setOption('theme', 'clean');

Anyone know where I need to add breakChainOnFailure in the above code. Thanks in advance!
« Last Edit: March 10, 2009, 08:18:45 PM by milesap »