This commit is contained in:
Barış Soner Uşaklı
2017-05-19 14:52:36 -04:00
parent 0bb52c5fc5
commit 95196ceedc
4 changed files with 19 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ module.exports = function (User) {
async.waterfall([
async.apply(User.getUserFields, uid, ['banned', 'banned:expire']),
function (userData, next) {
var banned = parseInt(userData.banned, 10) === 1;
var banned = userData && parseInt(userData.banned, 10) === 1;
if (!banned) {
return next(null, banned);
}