mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
if object doesn't exist user doesn't exist
This commit is contained in:
@@ -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) {
|
|
||||||
if (!exists) {
|
|
||||||
return callback();
|
|
||||||
}
|
|
||||||
User.getUserFields(uid, ['username', 'userslug', 'fullname', 'email'], next);
|
|
||||||
},
|
},
|
||||||
function (_userData, next) {
|
function (_userData, next) {
|
||||||
|
if (!_userData) {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
userData = _userData;
|
userData = _userData;
|
||||||
plugins.fireHook('static:user.delete', { uid: uid }, next);
|
plugins.fireHook('static:user.delete', { uid: uid }, next);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user