Auth: Show /restore only to unauthorized people

This commit is contained in:
Ilya Prokopenko 2021-12-31 11:35:05 +07:00
parent 8863ededf1
commit a1be5bb901
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56

View file

@ -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");