- Moved account info to within the profile menu hook, so it can be
  better filtered and shown to mods
- Also serves as a nice template for plugins that wish to listen
  to the profileMenu hook!
v1.18.x
Julian Lam 7 years ago
parent 6af7d0d07d
commit 7581dd1174

@ -50,11 +50,26 @@ helpers.getUserDataByUserSlug = function (userslug, callerUID, callback) {
ips: function (next) {
user.getIPs(uid, 4, next);
},
profile_links: function (next) {
profile_links: function (next) { // DEPRECATED, do not use
plugins.fireHook('filter:user.profileLinks', [], next);
},
profile_menu: function (next) {
plugins.fireHook('filter:user.profileMenu', { uid: uid, callerUID: callerUID, links: [] }, next);
plugins.fireHook('filter:user.profileMenu', {
uid: uid,
callerUID: callerUID,
links: [{
id: 'info',
route: 'info',
name: '[[user:account_info]]',
visibility: {
self: false,
other: false,
moderator: true,
globalMod: true,
admin: true,
},
}],
}, next);
},
groups: function (next) {
groups.getUserGroups([uid], next);

Loading…
Cancel
Save