public function actionCreate() {
$model = new Utente;
// Uncomment the following line if AJAX validation is needed
//$this->performAjaxValidation($model);
if (isset($_POST['Utente']))
{
$EsisteGia = $model->checkDuplicate(
$_POST['Utente']['cognome'],
$_POST['Utente']['nome'],
$_POST['Utente']['cf']);
if($EsisteGia){
$model = $this->loadModel($EsisteGia->id);
}
$model->attributes = $_POST['Utente'];
if ($model->save()){//.......