Fix nullpointerexception in user::renderView

This commit is contained in:
celestora 2022-10-24 23:09:11 +03:00 committed by GitHub
parent a63833c9fa
commit 6c29d40099
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ final class UserPresenter extends OpenVKPresenter
{
$user = $this->users->get($id);
if(!$user || $user->isDeleted()) {
if($user->isDeactivated()) {
if(!is_null($user) && $user->isDeactivated()) {
$this->template->_template = "User/deactivated.xml";
$this->template->user = $user;