|
|
@ -55,6 +55,16 @@ module.exports = function(User) {
|
|
|
|
return callback(err);
|
|
|
|
return callback(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fields.indexOf('banned') !== -1) {
|
|
|
|
|
|
|
|
// Also retrieve ban expiry for these users
|
|
|
|
|
|
|
|
db.sortedSetScores('users:banned:expire', uids, function(err, scores) {
|
|
|
|
|
|
|
|
users = users.map(function(userObj, idx) {
|
|
|
|
|
|
|
|
userObj.banned_until = scores[idx] || 0;
|
|
|
|
|
|
|
|
userObj.banned_until_readable = scores[idx] ? new Date(scores[idx]).toISOString() : 'Not Banned';
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
modifyUserData(users, fieldsToRemove, callback);
|
|
|
|
modifyUserData(users, fieldsToRemove, callback);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|