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
I have built a site with MEAN.JS (hosted on my own AWS EC2 servers) & now require a forum/community engine.
Have just come across nodeBB which appears to be a full site. Wondering what you guys think would be the best approach here?
Options I see are
Open to any other options.
Thanks in advance
@Shard if I'm not mistaken the session sharing plugin allows you to create users in YOUR application and then share them into nodebb. I'm not sure about the OP but I'm working on the reverse solution. Given the great user management/profile system in nodebb, I want to leverage that and then just share that user into my application.
There's a jwt plugin that should expose a jwt which can then be used in a non-nodebb app. Unfortunately it isn't in acp and it looks like it isn't up to date. It doesn't show up after being activated and the dev log reports that the plugin may not work with the current version of nodebb.
I'm going to spend a little time trying to get it updated. I think there's a lot of value in this because of how robust the entire user system is in nodebb.
So it turns out that the JWT plugin works, it's just missing a dependency. The package.conf needs nconf installed. Once it's there the plugin starts up as expected.
From there it's very simple. Just browse to yourforum.com/api/jwt and you'll get the token if you're logged in, or you'll be redirected to the login page if you're not. Write a bit of code in your site to consume this from an ajax call and save it locally for some period of time. I suppose you could get it on each load but that seems wasteful. Cache it in local storage and the user is now logged in on your site as well.