[FIX] Xmas header does not shows up for guests

This commit is contained in:
veselcraft 2020-12-29 12:24:17 -05:00
parent 2f76cbf7e2
commit 6d389537e3

View file

@ -140,6 +140,8 @@ abstract class OpenVKPresenter extends SimplePresenter
{
$user = Authenticator::i()->getUser();
$this->template->isXmas = intval(date('d')) >= 15 && date('m') == 12 || intval(date('d')) <= 15 && date('m') == 1 ? true : false;
if(!is_null($user)) {
$this->user = (object) [];
$this->user->raw = $user;
@ -147,7 +149,6 @@ abstract class OpenVKPresenter extends SimplePresenter
$this->user->id = $this->user->identity->getId();
$this->template->thisUser = $this->user->identity;
$this->template->userTainted = $user->isTainted();
$this->template->isXmas = intval(date('d')) >= 15 && date('m') == 12 || intval(date('d')) <= 15 && date('m') == 1 ? true : false;
if($this->user->identity->isBanned() && !$this->banTolerant) {
header("HTTP/1.1 403 Forbidden");