public function accessRules()
{
//user selected for admin
$user = UserInfo::model()->findAllBySql("select user_name from user_info where type_id='0' or type_id='1'");
$man=array("1","1");
foreach($user as $m):
array_push($man, $m->user_name);
endforeach;
return array(
array('allow', // allow all users to perform 'index' and 'view' actions
'actions'=>array('index','view'),
'users'=>array('*'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('createSaleOrder','create','action'),
'users'=>array('@'),
),
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions'=>array('admin','delete'),
'users'=>$man,
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}
public function actionCreateSaleOrder()
{
$baba = $_POST['textSaleOrder'];
$this->redirect(array('createSaleOrder', 'id' => $baba));//Error
}
When actionCreateSaleOrder() is call but redirect() not working. URL is correct but page not displayed.
Browse says
############################################################
The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept
cookies.
############################################################