From d55caf07a7e20aa3fe709eb6bd867079a55bdb40 Mon Sep 17 00:00:00 2001 From: Stefano Mtangoo Date: Tue, 15 Aug 2023 19:51:20 +0300 Subject: [PATCH] Do not auto-login user when is verified --- frontend/controllers/SiteController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 6de678a1e..e00739f93 100644 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -227,7 +227,7 @@ public function actionVerifyEmail($token) } catch (InvalidArgumentException $e) { throw new BadRequestHttpException($e->getMessage()); } - if (($user = $model->verifyEmail()) && Yii::$app->user->login($user)) { + if (($user = $model->verifyEmail())) { Yii::$app->session->setFlash('success', 'Your email has been confirmed!'); return $this->goHome(); }