If a user was previously in one group and is removed via there cookie claims so the groups is an empty array the updateUserGroups function doesnt process the data to force a leave of the previous group due to the userData.groups.length check.
So even though their claims say no groups, the forum still has them in the last group they had.
I think removing the userData.groups.length and maybe replacing it with Array.isArray check should fix the issue. Thought?
If a user was previously in one group and is removed via there cookie claims so the groups is an empty array the updateUserGroups function doesnt process the data to force a leave of the previous group due to the userData.groups.length check.
So even though their claims say no groups, the forum still has them in the last group they had.
I think removing the userData.groups.length and maybe replacing it with Array.isArray check should fix the issue. Thought?
https://github.com/julianlam/nodebb-plugin-session-sharing/blob/c41d7681c109926b435169e2b799696eb79f4b95/library.js#L329-L331