Update User Groups doesnt remove groups when groups is empty array
Closed this issue · 2 comments
uplift commented
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?
nodebb-plugin-session-sharing/library.js
Lines 329 to 331 in c41d768
julianlam commented
v4.5.0