Pergunta

I have a code on view page of Captcha verification . There is no image displayed on here. i also try requirements check of CCaptcha and put code on controller for action redirect. but nothing to be improved .

My view

        <?php
        if(CCaptcha::checkRequirements()){
        $this->widget('CCaptcha'); ?>
        <?php echo $form->textField($model,'verifyCode'); ?>
        </div>
        <div class="hint">Please enter the letters as they are shown in the image above.
        <br/>Letters are not case-sensitive.</div>
        <?php echo $form->error($model,'verifyCode'); 

                }
         ?>

In my controller

public function actions()
{
    return array(
        // captcha action renders the CAPTCHA image displayed on the contact page
        'captcha'=>array(
            'class'=>'CCaptchaAction',
            'backColor'=>0xFFFFFF,
        ),

    );
}

this only i get on view . No image displayed

captcha

Foi útil?

Solução

Thanks @gultomicro

public function accessRules(){'actions'=>array('create','captcha'), 'users'=>array('*')}

for your answer

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top