From 42bba8294102c67d9188bf845f30768bd16f7c02 Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko Date: Fri, 5 Aug 2022 21:29:31 +0100 Subject: [PATCH] Correct the code style in the profile deactivation function --- Web/Models/Entities/User.php | 4 ++-- Web/Presenters/AuthPresenter.php | 1 - Web/Presenters/UserPresenter.php | 2 -- Web/Presenters/templates/@deactivated.xml | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Web/Models/Entities/User.php b/Web/Models/Entities/User.php index f7ace42b..44db0cd9 100644 --- a/Web/Models/Entities/User.php +++ b/Web/Models/Entities/User.php @@ -971,7 +971,7 @@ class User extends RowModel function isDeleted(): bool { - if ($this->getRecord()->deleted == 1) + if($this->getRecord()->deleted == 1) return TRUE; else return FALSE; @@ -979,7 +979,7 @@ class User extends RowModel function isDeactivated(): bool { - if ($this->getDeactivationDate()->timestamp() > time()) + if($this->getDeactivationDate()->timestamp() > time()) return TRUE; else return FALSE; diff --git a/Web/Presenters/AuthPresenter.php b/Web/Presenters/AuthPresenter.php index b3a8e8c2..f3ed0d62 100644 --- a/Web/Presenters/AuthPresenter.php +++ b/Web/Presenters/AuthPresenter.php @@ -331,6 +331,5 @@ final class AuthPresenter extends OpenVKPresenter $this->user->identity->reactivate(); $this->redirect("/", 2); - exit; } } diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index 3ef4b9da..449763bb 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -282,7 +282,6 @@ final class UserPresenter extends OpenVKPresenter $user->toggleSubscription($this->user->identity); $this->redirect("/id" . $user->getId()); - exit; } function renderSetAvatar(): void @@ -506,7 +505,6 @@ final class UserPresenter extends OpenVKPresenter $this->user->identity->deactivate($reason); $this->redirect("/"); - exit; } function renderTwoFactorAuthSettings(): void diff --git a/Web/Presenters/templates/@deactivated.xml b/Web/Presenters/templates/@deactivated.xml index 1780abf1..0be41141 100644 --- a/Web/Presenters/templates/@deactivated.xml +++ b/Web/Presenters/templates/@deactivated.xml @@ -26,7 +26,7 @@
{_profile_deactivated_status}
-
+
{_profile_deactivated_info|noescape}