how to get list of member from userGroup ?? i have problem when access this function
void OnUserGroupLoaded(CBUserGroup[] group, string error){
Debug.Log(group[0].users.length);
}
i have created the group but the user show 0, can u help my problem ??
I suppose you're talking about version 1.x: in the webservice groups you have the function wsList that is getting the records from CB_UserGroup::Load, instead it should be like this:
foreach ($groups as $group) {
$list[] = $group->ToArray();
}
I applied this fix also to the incoming 2.0.5 thanks to your report 🙂
FRANCESCO CROCETTI @ SKARED CREATIONS
then i use version 1.x, so i need to add/put the code above to the file CB_UserGroup.php ??
No, I'm talking about the webservice "groups.php" function wsList there's a line where it's setting the returned list from CB_UserGroup::Load, you need to replace that line with the code above (remember to enclose it within {} eventually).
FRANCESCO CROCETTI @ SKARED CREATIONS
thanks it solved my problem..:)
i have another problem in this function :
void OnUserGroupSaved (CBUserGroup grup, string error){
if(grup != null)
Debug.Log("Saved: " +grup.name);
}
the grup created successfully, but on that function it didn't show my group.name, can u help me solve this problem??