From b35b87567b0213124ef1db9e66eb8ae91f4198c8 Mon Sep 17 00:00:00 2001 From: Dmitry Tretyakov <76806170+tretdm@users.noreply.github.com> Date: Sun, 2 Jul 2023 13:11:49 +0700 Subject: [PATCH] VKAPI: Add banned (not only deleted!) user stub Final fix #622 --- VKAPI/Handlers/Users.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/VKAPI/Handlers/Users.php b/VKAPI/Handlers/Users.php index f48592b5..a4298787 100644 --- a/VKAPI/Handlers/Users.php +++ b/VKAPI/Handlers/Users.php @@ -32,7 +32,15 @@ final class Users extends VKAPIRequestHandler "first_name" => "DELETED", "last_name" => "", "deactivated" => "deleted" - ]; + ]; + } else if($usr->isBanned()) { + $response[$i] = (object)[ + "id" => $usr->getId(), + "first_name" => $usr->getFirstName(), + "last_name" => $usr->getLastName(), + "deactivated" => "banned", + "ban_reason" => $usr->getBanReason() + ]; } else if($usrs[$i] == NULL) { } else {