Answer the question
In order to leave comments, you need to log in
Why doesn't CaptchaExtended work in Yii?
So:
1. Attached the captcha. Attached the standard. I understood all the hopelessness and frailty of the world, I decided to hide this ugliness and not dishonor my name.
2. The problem has not gone away. Captcha is still needed... I went looking for it.
3. I decided not to go far to the Pacific Ocean, and took it off. site extension .
4. Registered configs:
4.1. In components:
class Controller extends CController
{
// тыры-пыры, блаблабла и т.д.
public function init(){
Yii::$classMap = array_merge( Yii::$classMap, array(
'CaptchaExtendedAction' => Yii::getPathOfAlias('ext.captchaExtended').
'/'.'CaptchaExtendedAction.php',
'CaptchaExtendedValidator' => Yii::getPathOfAlias('ext.captchaExtended').
'/'.'CaptchaExtendedValidator.php'
));
}
}
public function actions()
{
return array(
'captcha'=>array(
'class'=>'CaptchaExtendedAction',
'mode' => CaptchaExtendedAction::MODE_WORDS,
),
);
}
array(
'verifyCode', 'CaptchaExtendedValidator',
'allowEmpty' => CCaptcha::checkRequirements()
),
<?php $form->widget('CCaptcha',array('buttonLabel'=>' ')); ?>
Answer the question
In order to leave comments, you need to log in
If there is ajax validation, then the problem is in it. The captcha code changes during validation, and then when $model->save() occurs, the captcha code is already different, and in the post array the old code, everything is a hat ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question