I can't understnad why this is not working. This code snippt is in my userscontroller.php
Does it need to be elsewhere?
public function actionCreate()
{
$model=new Users;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['Users']))
{
$model->attributes=$_POST['Users'];
$model->password = crypt_SHA_512($model->password,'salt');
if($model->save())
$this->redirect(array('view','id'=>$model->users_id));
}
$this->render('create',array(
'model'=>$model,
));
}