mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15:46 +01:00
decrease user count when user is deleted
This commit is contained in:
@@ -250,7 +250,7 @@ module.exports = function(User) {
|
|||||||
db.delete('uid:' + uid + ':favourites', next);
|
db.delete('uid:' + uid + ':favourites', next);
|
||||||
},
|
},
|
||||||
function(next) {
|
function(next) {
|
||||||
db.delete('user:' + uid + ':settings', next);
|
db.delete('user:' + uid + ':settings', next);
|
||||||
},
|
},
|
||||||
function(next) {
|
function(next) {
|
||||||
db.delete('uid:' + uid + ':topics', next);
|
db.delete('uid:' + uid + ':topics', next);
|
||||||
@@ -293,6 +293,9 @@ module.exports = function(User) {
|
|||||||
},
|
},
|
||||||
function(next) {
|
function(next) {
|
||||||
db.delete('user:' + uid, next);
|
db.delete('user:' + uid, next);
|
||||||
|
},
|
||||||
|
function(next) {
|
||||||
|
db.decrObjectField('global', 'userCount');
|
||||||
}
|
}
|
||||||
], callback);
|
], callback);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user