Cant Work @ in Access rules

Hi,

public function filters() {

    return array(


        'accessControl',


        'postOnly + delete',


    );


}





public function accessRules() {





    


		if (Yii::app()->user->getState('role') == "reseller") {


        $arr = array('dashboard');


    } else {


        $arr = array('');


    }


    return array(


        array('allow',


            'actions' => array('index', 'view', 'logout', 'forgetpassword'),


            'users' => array('*'),


        ),


        array('allow',


            'actions' => $arr,


            'users' => array('@'),


        ),


        array('deny',


            'users' => array('*'),


        ),


    );


}

Cant redirect dashboard page after login i changed the allow array @ to * mean it will redirect but it cant redirect when use @ why?I cant understand @ use? please explain me

Obviously your state is not set correctly. Try to print it using:


var_dump(Yii::app()->user->getState('role'));exit; 

and let us what you get.

Check your code again. I think you cannot do something like this:

$arr = array(’’);

To make an empty array, you just need to do:

$arr = array();

This should work.