public function actionLogin() { if (!\Yii::$app->user->isGuest) { return $this->goHome(); } $model = new LoginForm(); if ($model->load(Yii::$app->request->post()) && $model->login()) { $model->updateUserInfo(); return $this->goBack(); } else { return $this->render('login', ['model' => $model]); } }