mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 05:55:48 +01:00
feat: update unban logic/invocation and refactor User.bans module
* auto unban when User.getUsersFields is called and the user is banned but has expired * cleanups and removal of expiry_readable * expiry_readable make an alias for backward compatibility * User.bans.func vs User.*ban*Func * console.log cleanups, plus todo message added * use code util.deprecate * fix: remove ununsed winston require
This commit is contained in:
@@ -108,8 +108,8 @@ module.exports = function (middleware) {
|
||||
},
|
||||
navigation: async.apply(navigation.get, req.uid),
|
||||
tags: async.apply(meta.tags.parse, req, data, res.locals.metaTags, res.locals.linkTags),
|
||||
banned: async.apply(user.isBanned, req.uid),
|
||||
banReason: async.apply(user.getBannedReason, req.uid),
|
||||
banned: async.apply(user.bans.isBanned, req.uid),
|
||||
banReason: async.apply(user.bans.getReason, req.uid),
|
||||
|
||||
unreadData: async.apply(topics.getUnreadData, { uid: req.uid }),
|
||||
unreadChatCount: async.apply(messaging.getUnreadCount, req.uid),
|
||||
|
||||
Reference in New Issue
Block a user