This commit is contained in:
Barış Soner Uşaklı
2017-05-19 16:07:53 -04:00
committed by GitHub
parent d8c60f417d
commit 541b0487ef

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);
}