mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 05:56:53 +02:00
@@ -18,7 +18,7 @@ module.exports = function (User) {
|
||||
return;
|
||||
}
|
||||
const [userData, isAdminOrMod] = await Promise.all([
|
||||
User.getUserFields(uid, ['uid', 'banned', 'mutedUntil', 'joindate', 'email', 'reputation'].concat([field])),
|
||||
User.getUserFields(uid, ['uid', 'mutedUntil', 'joindate', 'email', 'reputation'].concat([field])),
|
||||
privileges.categories.isAdminOrMod(cid, uid),
|
||||
]);
|
||||
|
||||
@@ -30,10 +30,6 @@ module.exports = function (User) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (userData.banned) {
|
||||
throw new Error('[[error:user-banned]]');
|
||||
}
|
||||
|
||||
const now = Date.now();
|
||||
if (userData.mutedUntil > now) {
|
||||
let muteLeft = ((userData.mutedUntil - now) / (1000 * 60));
|
||||
|
||||
Reference in New Issue
Block a user