Hi,
I try to follow this post:
https:||github.com/yiisoft/yii/pull/402
So I have the code as follows in my controller:
public function filters(){
return array('accessControl');
}
public function accessRules(){
return array(
array(
'deny',
'deniedCallback' => 'redirectToHome',
'actions'=>array('login'),
'users'=>array('@'),
),
);
}
public function redirectToHome(){
$this->redirect('/site/home');
}
Unfortunately - the following message pops-up:
Error: 500
call_user_func() expects parameter 1 to be a valid callback, function 'redirectToHome' not found or invalid function name
Any idea why my callback is not recognized?
Of course I use recent 1.1.12 version of Yii framework.
Thanks ahead!