/**
  * Creates a new UserProfile model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new SignupForm();
     if ($model->load(Yii::$app->request->post()) && $model->signup()) {
         return $this->redirect(['index']);
     }
     return $this->render('create', ['model' => $model]);
 }
 public function actionSignup()
 {
     $model = new SignupForm();
     if ($model->load(Yii::$app->request->post())) {
         if ($user = $model->signup()) {
             if (Yii::$app->getUser()->login($user)) {
                 return $this->goBack();
             }
         }
     }
     return $this->render('signup', ['model' => $model]);
 }