Help pulling user info
-
does this help? http://community.nodebb.org/api/user/psychobunny
-
to get current user's name,
app.username
. then its just a simple matter of doing something like $.get -
O.o Interesting. @psychobunny thanks.
-
Not on the client side, but on server-side, you can run this:
var Groups = require('./groups'); Groups.getGidFromName('Administrators', function(err, gid) { console.log('admin group gid is', gid); });
getByGroupName
will also return the group object -
I feel like getting group membership should be publically available, so we could write a groups page for example, or give users labels depending on who they are. (ex. coloured username / badge for admins)
Copyright © 2024 NodeBB | Contributors