diff --git a/controllers/UserController.php b/controllers/UserController.php index 4ec5bf3..436b4f8 100644 --- a/controllers/UserController.php +++ b/controllers/UserController.php @@ -130,6 +130,9 @@ public function actionResetPassword($token) public function actionProfile() { + if (\Yii::$app->user->isGuest) { + return $this->redirect(Url::toRoute('/login')); + } $model = Yii::$app->user->identity; $changePasswordForm = new ChangePasswordForm; $changeEmailForm = new ChangeEmailForm;