I was trying to get the user groups. Even though user joined 2 different groups the code in the documentation i put below returns only one of them.
Can anyone tell me what the problem might be ?
Thanks…
The code:
string userId =session.UserId;
var result = await client.ListUserGroupsAsync(session, userId);
foreach (var ug in result.UserGroups)
{
var g = ug.Group;
Debug.LogFormat("Group '{0}' role '{1}'", g.Id, ug.State);
}
Hello again @lugehorsam,
// group already open so user should have been in the group
const string groupId = “67616c96-9ee0-45b9-9fae-348dc974e133”;// example
await client.JoinGroupAsync(session, groupId);
// this is how i am trying to get the data(it returns only one group which user is superadmin)
string userId =session.UserId;
var result = await client.ListUserGroupsAsync(session, userId);
foreach (var ug in result.UserGroups)
{
var g = ug.Group;
Debug.LogFormat(“Group ‘{0}’ role ‘{1}’”, g.Id, ug.State);
}