From ec0624918fa99428b7d2f1189b3b674b2207a8ff Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 5 Nov 2014 13:35:15 -0500 Subject: [PATCH] possible fix for #2351 --- src/groups.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groups.js b/src/groups.js index 899dfd55b7..4168cdd7f1 100644 --- a/src/groups.js +++ b/src/groups.js @@ -159,7 +159,7 @@ var async = require('async'), }; Groups.isMember = function(uid, groupName, callback) { - if (!parseInt(uid, 10)) { + if (typeof uid !== 'string' && !parseInt(uid, 10)) { return callback(null, false); } db.isSetMember('group:' + groupName + ':members', uid, callback); @@ -170,7 +170,7 @@ var async = require('async'), }; Groups.isMemberOfGroups = function(uid, groups, callback) { - if (!parseInt(uid, 10)) { + if (typeof uid !== 'string' && !parseInt(uid, 10)) { return callback(null, groups.map(function() {return false;})); } groups = groups.map(function(groupName) {