|
|
|
@ -47,6 +47,13 @@ module.exports = function(User) {
|
|
|
|
|
return callback(err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
plugins.fireHook('static:user.delete', {
|
|
|
|
|
uid: uid
|
|
|
|
|
}, function(err) {
|
|
|
|
|
if (err) {
|
|
|
|
|
return callback(err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async.parallel([
|
|
|
|
|
function(next) {
|
|
|
|
|
db.sortedSetRemove('username:uid', userData.username, next);
|
|
|
|
@ -103,6 +110,7 @@ module.exports = function(User) {
|
|
|
|
|
groups.leaveAllGroups(uid, next);
|
|
|
|
|
},
|
|
|
|
|
function(next) {
|
|
|
|
|
// Deprecated as of v0.7.4, remove in v1.0.0
|
|
|
|
|
plugins.fireHook('filter:user.delete', uid, next);
|
|
|
|
|
}
|
|
|
|
|
], function(err) {
|
|
|
|
@ -113,6 +121,7 @@ module.exports = function(User) {
|
|
|
|
|
db.deleteAll(['followers:' + uid, 'following:' + uid, 'user:' + uid], callback);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function deleteUserIps(uid, callback) {
|
|
|
|
|