|
|
@ -50,15 +50,12 @@ module.exports = function (User) {
|
|
|
|
var userData;
|
|
|
|
var userData;
|
|
|
|
async.waterfall([
|
|
|
|
async.waterfall([
|
|
|
|
function (next) {
|
|
|
|
function (next) {
|
|
|
|
User.exists(uid, next);
|
|
|
|
db.getObject('user:' + uid, next);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
function (exists, next) {
|
|
|
|
function (_userData, next) {
|
|
|
|
if (!exists) {
|
|
|
|
if (!_userData) {
|
|
|
|
return callback();
|
|
|
|
return callback();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
User.getUserFields(uid, ['username', 'userslug', 'fullname', 'email'], next);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
function (_userData, next) {
|
|
|
|
|
|
|
|
userData = _userData;
|
|
|
|
userData = _userData;
|
|
|
|
plugins.fireHook('static:user.delete', { uid: uid }, next);
|
|
|
|
plugins.fireHook('static:user.delete', { uid: uid }, next);
|
|
|
|
},
|
|
|
|
},
|
|
|
|