fix(wall): 500 error xd

This commit is contained in:
veselcraft 2025-01-22 17:19:57 +03:00
parent 0a3231e8ef
commit 3afb44fd89
No known key found for this signature in database
GPG key ID: 9CF0B42766CCF7BA

View file

@ -46,7 +46,10 @@ final class WallPresenter extends OpenVKPresenter
function renderWall(int $user, bool $embedded = false): void
{
$owner = ($user < 0 ? (new Clubs) : (new Users))->get(abs($user));
if ($owner->isBanned() || $owner->isDeleted() || !$owner->canBeViewedBy($this->user->identity))
if ($owner->isBanned() || !$owner->canBeViewedBy($this->user->identity))
$this->flashFail("err", tr("error"), tr("forbidden"));
if ($user > 0 && $owner->isDeleted())
$this->flashFail("err", tr("error"), tr("forbidden"));
if(is_null($this->user)) {