mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
This commit is contained in:
committed by
Barış Soner Uşaklı
parent
c6cd6c5705
commit
45acf80987
@@ -45,6 +45,9 @@ module.exports = function (User) {
|
||||
if (until > now) {
|
||||
tasks.push(async.apply(db.sortedSetAdd, 'users:banned:expire', until, uid));
|
||||
tasks.push(async.apply(User.setUserField, uid, 'banned:expire', until));
|
||||
} else {
|
||||
tasks.push(async.apply(db.sortedSetRemove, 'users:banned:expire', uid));
|
||||
tasks.push(async.apply(User.setUserField, uid, 'banned:expire', 0));
|
||||
}
|
||||
|
||||
async.series(tasks, function (err) {
|
||||
|
||||
Reference in New Issue
Block a user