diff --git a/src/groups.js b/src/groups.js index 3b5c6e8318..b4ee1b9c17 100644 --- a/src/groups.js +++ b/src/groups.js @@ -181,12 +181,12 @@ return callback(null, null); } - async.some(groupNames, function(groupName, next) { - Groups.isMember(uid, groupName, function(err, isMember) { - next(!err && isMember); - }); - }, function(result) { - callback(null, result); + Groups.isMemberOfGroups(uid, groupNames, function(err, isMembers) { + if (err) { + return callback(err); + } + + callback(null, isMembers.indexOf(true) !== -1) }); }); };