Hi ,
Firstly when I use the accessControl filter in my controller ,captcha in login page is not displaying and here goes my code in controller
public function actions()
{
return array(
// captcha action renders the CAPTCHA image displayed on the contact page
'captcha'=>array(
'class'=>'CCaptchaAction',
'backColor'=>0xF8F8F8,
'foreColor'=>0x000000,
),
// page action renders "static" pages stored under 'protected/views/site/pages'
// They can be accessed via: index.php?r=site/page&view=FileName
'page'=>array(
'class'=>'CViewAction',
),
);
}
public function filters()
{
return array(
'accessControl', // perform access control for CRUD operations
// 'postOnly + delete', // we only allow deletion via POST request
);
}
public function accessRules()
{
return array(
array('allow', // allow all users to perform 'index' and 'view' actions
'actions'=>array('actions'),
'users'=>array('*'),
),
array('allow', // allow all users to perform 'index' and 'view' actions
'actions'=>array('index','captcha',),
'users'=>array('*'),
)
)
}
here is my code in view $this->widget('CCaptcha', array( 'showRefreshButton'=>true,'buttonOptions'=>array('id'=>'refreshCaptcha','title'=>'Get a new code') ));
Where did I make mistake.Please suggest me the right way to sort out this issue of conflicting captcha with accessControl . Thanks in advance
Hi Sir, Thank you for reply
For me it is login screen is in view index.php
and the captcha I have pasted is from the index.php
and still nothing works out well
should I need to add the url for the Captcha ?
I have tried that too and still the issue exists
what should I do sir?
Hi ,
For me login screen is in view index.php
and the I have pasted captcha from the index.php
and still nothing works out well.
I have observed that while loading the page with captcha and the accesscontrole, several javascript files from assets are loading may be this is the issue of conflict of captcha and accesscontrol .
if it is the problem, what should we do to over come this issue?
should I need to add the url for the Captcha ?
I have tried that too and still the issue exists
what should we do sir?
Please suggest me the right way to sort out this issue