mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15:46 +01:00
WIP commit -- groups refactoring + upgrade scripts
This commit is contained in:
@@ -275,7 +275,7 @@ module.exports = function(User) {
|
||||
deleteUserFromFollowers(uid, next);
|
||||
},
|
||||
function(next) {
|
||||
deleteUserFromGroups(uid, next);
|
||||
groups.leaveAllGroups(uid, next);
|
||||
}
|
||||
], function(err) {
|
||||
if (err) {
|
||||
@@ -320,12 +320,4 @@ module.exports = function(User) {
|
||||
}, callback);
|
||||
});
|
||||
}
|
||||
|
||||
function deleteUserFromGroups(uid, callback) {
|
||||
groups.getGroupIds(function(err, gids) {
|
||||
async.each(gids, function(gid, next) {
|
||||
groups.leave(gid, uid, next);
|
||||
}, callback);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user