You can use Ajax to request their user page, and in the json it should specify all of the groups they're in.
ah sorry forgot to reply here,
meantime I found out, that its not a problem in custom JS to use app.user.groupTitle 🙂
it works fine so good
So I wish to inherit and incorporate nodeBB with another account system that I already have. e.g. the reputation gets updated on my other platform, and the user profile page on the other platform has access to the post history on nodeBB.
Basically I need a forum for my other platform, but I don't want to write it from scratch. If nodeBB is the wrong place to look, please let me know as well.
I'm looking into directly edit the js files but I thought it's best if I get some pointers first.
Thanks so much!
Best user experience is Session Sharing:
Another option is Single Sign On (SSO):
@scottalanmiller Thanks for the reply!
What are some resources/documentation that can help me start on this? Like a documentation on the existing code base, and where in the code should I modify for customization?
I'm probably wrong on this but I have the impression that I need to write a new plug-in for every custom feature, which I hope to avoid.
The recommended method of sharing sessions between two separate and distinct applications is through OAuth2. We recommend this approach because NodeBB maintains its own user records, so that we can keep track of user-related metrics and other data. Relying on another database would be tricky, prone to breaking, and quite possibly dangerous.
Luckily, it's quite straightforward to get things working with OAuth2!
The first step is getting your application to expose an OAuth2 endpoint. If you're running a Node.js based app, you can use a module called OAuth2orize.
Once that is set up, you'll want to take a look at the SSO plugin skeleton for customised OAuth deployments -- nodebb-plugin-sso-oauth. You'll take this plugin, fork it, and modify it to communicate with your OAuth endpoint.
Once everything is working properly, you should be able to register and log in/out via your web app.