예제 #1
0
 public function run()
 {
     $model = new LoginByEmail();
     if ($model->load(Yii::$app->request->post()) && $model->login()) {
         return $this->render('widgetLogin', ['model' => $model]);
     } else {
         return $this->render('widgetLogin', ['model' => $model]);
     }
 }
예제 #2
0
 public function actionLogin()
 {
     if (!\Yii::$app->user->isGuest) {
         return $this->goHome();
     }
     // $userSettings = Yii::$app->cache->get('userSettings');
     $model = new LoginByEmail();
     if ($model->load(Yii::$app->request->post()) && $model->login()) {
         return $this->goBack();
     } else {
         return $this->render('login', ['model' => $model]);
     }
 }