@PitaJ Thank you, nice!
Check if user is in group
Hey there! So, I've been customizing a theme lately, and I was wondering if there was a way to check if a user is in a group, for example:
Please let me know if there's any way of doing this, thank you!
EDIT: Or even being able to do this per-user would be absolutely fine for me! Thanks again.
- Notice the hook listener registered here: https://github.com/NodeBB/nodebb-plugin-quickstart/blob/master/plugin.json#L7
- Corresponding to a method in the plugin library itself: https://github.com/NodeBB/nodebb-plugin-quickstart/blob/master/library.js#L7
You'll want to listen to the hook I mentioned above, and make a call to
groups.isMember()to check group membership status, and then save it to the corresponding users' information.