You could use the ListMembership API to check if a user has already been a member of a group. If yes and the user wants to join another group, you can remove the user from the previous group first, then add him to the new group.
From your answer, what I understand is like if ListMembership API response contains empty list of Groups, than that means a player is not a member of any group and is allowed to join any group. But if the Groups list contain any member, player is not allowed to join any group until he leave the previous one. Am I right @Rick Chen?
The player is always allowed to join multiple groups, even if ListMembership API returns a list of groups that the player is in. It is up to you to control how player joins a group. If you would like that a player can only be a member of one group at a time, you could implement what I said previously. Please check the available group API for removing members from or adding members to a group.
Ok. Didn't get it exactly but thank you so much.
2 People are following this question.