mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
Closes #6245
- 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!
This commit is contained in:
@@ -50,11 +50,26 @@ helpers.getUserDataByUserSlug = function (userslug, callerUID, callback) {
|
|||||||
ips: function (next) {
|
ips: function (next) {
|
||||||
user.getIPs(uid, 4, next);
|
user.getIPs(uid, 4, next);
|
||||||
},
|
},
|
||||||
profile_links: function (next) {
|
profile_links: function (next) { // DEPRECATED, do not use
|
||||||
plugins.fireHook('filter:user.profileLinks', [], next);
|
plugins.fireHook('filter:user.profileLinks', [], next);
|
||||||
},
|
},
|
||||||
profile_menu: function (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: function (next) {
|
||||||
groups.getUserGroups([uid], next);
|
groups.getUserGroups([uid], next);
|
||||||
|
|||||||
Reference in New Issue
Block a user