get_group_list
Gets from grpmem table list of the user groups. Returns number of objects found and object list as the object. Most often it should be used in conjunction with dob_by_index method.
Definition:
get_group_list (string) ;
string - user persistent_id
working example:
uuid who;
int count, i;
object obList, atev_dob;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "get_group_list", format("cnt:%s", who));
if (!msg_error()) {
count = msg[1];
obList = msg[0];
for (i=0;i<count;i++) {
send_wait(0, obList, "dob_by_index", "DEFAULT", i, i);
if (!msg_error()) {
atev_dob = msg[0];
printf("%s ",atev_dob.member.last_name);
printf("%s \n",atev_dob.group.last_name);
}
else
{
printf("get_group_list %s",msg[0]);
}
}
}
else{
printf("get_group_list %s",msg[0]);
}