fix(wall): it's now forbidden to look into deleted user's wall

This commit is contained in:
veselcraft 2025-01-22 17:10:32 +03:00
parent 2d83003b6c
commit 0a3231e8ef
No known key found for this signature in database
GPG key ID: 9CF0B42766CCF7BA

View file

@ -46,7 +46,7 @@ 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->canBeViewedBy($this->user->identity))
if ($owner->isBanned() || $owner->isDeleted() || !$owner->canBeViewedBy($this->user->identity))
$this->flashFail("err", tr("error"), tr("forbidden"));
if(is_null($this->user)) {