how we can implement member as default user in a controller :
public function accessRules(){
return array(
array('allow',
'actions'=>array('index','cleardata',),
//'expression'=>'!Yii::app()->member->isGuest',
//'users'=>array('@'),
'members'=>array('@'), //this errors, Property "CAccessRule.members" is not defined.
),
array('deny', 'users' => array('*')),
);
}
public function filters()
{
// return the filter configuration for this controller, e.g.:
return array(
'accessControl',
);
}
error Property “CAccessRule.members” is not defined. how to add members property
public function defaultAccessRules()
{
return array(
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update','admin','delete'),
'users'=>array('admin'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update','admin','delete'),
'users'=>array('members'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update','admin','delete'),
'users'=>array('content_verifier'),
),
);
}