Correct the code style in the profile deactivation function

This commit is contained in:
Maxim Leshchenko 2022-08-05 21:29:31 +01:00
parent b1ce106e4c
commit 42bba82941
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE
4 changed files with 3 additions and 6 deletions

View file

@ -971,7 +971,7 @@ class User extends RowModel
function isDeleted(): bool function isDeleted(): bool
{ {
if ($this->getRecord()->deleted == 1) if($this->getRecord()->deleted == 1)
return TRUE; return TRUE;
else else
return FALSE; return FALSE;
@ -979,7 +979,7 @@ class User extends RowModel
function isDeactivated(): bool function isDeactivated(): bool
{ {
if ($this->getDeactivationDate()->timestamp() > time()) if($this->getDeactivationDate()->timestamp() > time())
return TRUE; return TRUE;
else else
return FALSE; return FALSE;

View file

@ -331,6 +331,5 @@ final class AuthPresenter extends OpenVKPresenter
$this->user->identity->reactivate(); $this->user->identity->reactivate();
$this->redirect("/", 2); $this->redirect("/", 2);
exit;
} }
} }

View file

@ -282,7 +282,6 @@ final class UserPresenter extends OpenVKPresenter
$user->toggleSubscription($this->user->identity); $user->toggleSubscription($this->user->identity);
$this->redirect("/id" . $user->getId()); $this->redirect("/id" . $user->getId());
exit;
} }
function renderSetAvatar(): void function renderSetAvatar(): void
@ -506,7 +505,6 @@ final class UserPresenter extends OpenVKPresenter
$this->user->identity->deactivate($reason); $this->user->identity->deactivate($reason);
$this->redirect("/"); $this->redirect("/");
exit;
} }
function renderTwoFactorAuthSettings(): void function renderTwoFactorAuthSettings(): void

View file

@ -26,7 +26,7 @@
<div class="page_status" style="color: #AAA;">{_profile_deactivated_status}</div> <div class="page_status" style="color: #AAA;">{_profile_deactivated_status}</div>
</div> </div>
</div> </div>
<center style="color: #AAA;margin: 40px 0;font-size: 13px;"> <center style="color: #AAA; margin: 40px 0; font-size: 13px;">
{_profile_deactivated_info|noescape} {_profile_deactivated_info|noescape}
</center> </center>
</div> </div>