You can use groups:visible:name, groups:visible:memberCount, groups:visible:createtime
How to get the current users id in 'addNavigation'
-
Hi,
I'm trying to add an item to the navigation system if the user has a value set against their profile, but I'm not sure how to access the current users ID within the addNavigation hook
plugin.addNavigation = function(header, callback) { User = module.parent.require('./user'); User.getUserField(<<CURRENT USER ID SHOULD GO HERE>>, 'gold_member', function(value) { if(value){ header.navigation.push({ class: "", iconClass: 'fa fa-fw ' + 'fa-plus', "name": "hello", "text": "Add Forum", "title": "hello world", route: "/new_category" }); } callback(null, header); }); } ``` any ideas? Cheers, M
-
@baris Fantastic. Thanks!