Esempio n. 1
0
 public function actionCreate()
 {
     $user = new Users();
     if ($user->load(Yii::$app->request->post()) && $user->validate()) {
         $user['user_active_from'] = date("Y-m-d");
         $user->save();
         return $this->redirect('index');
     }
     return $this->render('create', ['user' => $user]);
 }