php - To restrict menu tab using Yii -
i want restrict menu tab if aren't loggin , therefore redirect loggin web page. for example, if have in layout/main.php: <div id="mainmenu"> <?php $this->widget('zii.widgets.cmenu',array( 'items'=>array( array('label'=>'visit us', 'url'=>array('/visit/index')), array('label'=>'employee', 'url'=>array('/employee/index')), array('label'=>'login', 'url'=>array('/site/login'), 'visible'=>yii::app()->user->isguest), and want restrict menu tab employee , should write restriction? i read in post somethings this, don't know how use it: if(!isset($_session["user"])) { header("location: homepage.php"); } please, me? thank much it written in docs . define if menu element visible, use visible params, same login page, negatio...