From a1be5bb901dc2afe0d67c283ab405f86b0e09621 Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Fri, 31 Dec 2021 11:35:05 +0700 Subject: [PATCH] Auth: Show /restore only to unauthorized people --- Web/Presenters/AuthPresenter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Web/Presenters/AuthPresenter.php b/Web/Presenters/AuthPresenter.php index 255218fc..0d43315b 100644 --- a/Web/Presenters/AuthPresenter.php +++ b/Web/Presenters/AuthPresenter.php @@ -215,6 +215,9 @@ final class AuthPresenter extends OpenVKPresenter function renderRestore(): void { + if(!is_null($this->user)) + $this->redirect("/id" . $this->user->id, static::REDIRECT_TEMPORARY); + if(($this->queryParam("act") ?? "default") === "finish") $this->pass("openvk!Auth->finishRestoringPassword");