Skip to content

Commit

Permalink
if user isGuest go to login page
Browse files Browse the repository at this point in the history
  • Loading branch information
idealist35 committed Nov 8, 2017
1 parent b8fbe90 commit 3af9463
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function actionResetPassword($token)
public function actionProfile()
{
if (\Yii::$app->user->isGuest) {
return $this->goHome();
return $this->redirect(Url::toRoute('/login'));
}
$model = Yii::$app->user->identity;
$changePasswordForm = new ChangePasswordForm;
Expand Down

0 comments on commit 3af9463

Please sign in to comment.