Hi I am new to Yii. I have a form in which i add (or update) a new user, and i added a field (list - select box) called ‘RBAC’ to add the new user to a specified role. How can i get this value and store it in DB while also creating the new user?
I only see this on the create/update actions:
$model=new User;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['User']))
{
$model->attributes=$_POST['User'];
if($model->save())
$this->redirect(array('view','id'=>$model->id));
}
$this->render('create',array(
'model'=>$model,
));