return group id if user are in groups (array)

daffik1

Member
Joined
Feb 19, 2016
Messages
23
Reaction score
2
Points
50
Hi,

I need a script that will return the ID of the search group and then the script that will read its name from that id
I make something like this:

Code:
$user_groups = explode(',',$client['client_servergroups']);

groups to search for are in array like this 'Groups' => array(21,65)

if($instance->isInGroup($user_groups,$config[$instanceid]['functions']['functiontest']['Groups'])) // return true/1 if yes

and here I do not know how to return the found group id and then retrieve its name
 

Norvik

Retired Staff
Contributor
Joined
Jul 18, 2015
Messages
635
Reaction score
588
Points
157
What is the instance variable? The handle to your server? And what exactly are you trying to achieve? You have a list of groupids and you want to return their name?
 
Top