Hi,
After click on activation link http://www.example.com/devtest/index.php?r=user/check&activationcode=bc74873d0e3f684d3e6b99a36169a793ee688406 then it redirect to login page. I think my following controller code not working for view file check.php which located on user directory.
public function actionCheck()
{
$model=new User;
$activationcode = Yii::app()->request->getQuery('activationcode');
if(isset($activationcode))
{
$model = User::model()->findByAttributes(array('activationcode'=>$activationcode));
if($model !== null)
{
$model->status=1;
$model->save();
Yii::app()->user->setFlash('check','Thank you for register with us');
$this->refresh();
}
}
$this->render('check',array(
'model'=>$model,
));
}
I am not sure how I can handle GET URL action in UserController. Also, I already tested by adding word 'check' in accessRules but then browser show me Page not redirect properly.
public function accessRules()
{
return array(
array('allow', // allow all users to perform 'index' and 'view' actions
'actions'=>array('index','create','view','captcha'),
'users'=>array('*'),
),
.....
.....
);
}
Any idea? Please give me a idea about how I can solve this.
With Thanks,
MRS