mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +03:00
VKAPI: Make groups.getById not require auth
Just like the original VK
This commit is contained in:
parent
2d09e0116e
commit
8ce8355784
1 changed files with 5 additions and 6 deletions
|
@ -110,8 +110,6 @@ final class Groups extends VKAPIRequestHandler
|
||||||
|
|
||||||
function getById(string $group_ids = "", string $group_id = "", string $fields = ""): ?array
|
function getById(string $group_ids = "", string $group_id = "", string $fields = ""): ?array
|
||||||
{
|
{
|
||||||
$this->requireUser();
|
|
||||||
|
|
||||||
$clubs = new ClubsRepo;
|
$clubs = new ClubsRepo;
|
||||||
|
|
||||||
if ($group_ids == NULL && $group_id != NULL)
|
if ($group_ids == NULL && $group_id != NULL)
|
||||||
|
@ -191,6 +189,7 @@ final class Groups extends VKAPIRequestHandler
|
||||||
$response[$i]->contacts = $contacts;
|
$response[$i]->contacts = $contacts;
|
||||||
break;
|
break;
|
||||||
case 'can_post':
|
case 'can_post':
|
||||||
|
if(!is_null($this->getUser()))
|
||||||
if($clb->canBeModifiedBy($this->getUser()))
|
if($clb->canBeModifiedBy($this->getUser()))
|
||||||
$response[$i]->can_post = true;
|
$response[$i]->can_post = true;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue