Access Rules Not Working Properly

I have problem with access control. I have rule:




                                'deniedCallback' => array($this->render('//site/info',array('message'=>'You must activate your account.')),Yii::app()->end()), 



public function isRegistered()


    return (Yii::app()->user->isGuest) ? FALSE : $this->level == 1;


If I login as admin and i have level 3, isRegistered() return false, but deniedCalback runs.

How to change this to run callback only when expression is true?


check the documentation of deniedCallback

try this

'deniedCallback' => array($this, 'ActionToSiteInfo'),