From c47db0e908f3a3fda4a3420239e7ca8bd1573b7f Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Fri, 5 Jul 2013 18:24:29 -0400 Subject: [PATCH] async.each for get_userslugs_by_uids --- src/user.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/user.js b/src/user.js index 8e2eedd51d..e6412d4c5e 100644 --- a/src/user.js +++ b/src/user.js @@ -532,7 +532,6 @@ var utils = require('./../public/src/utils.js'), } function iterator(uid, callback) { - User.getUserField(uid, 'userslug', function(userslug) { userslugs.push(userslug); callback(null); @@ -540,22 +539,8 @@ var utils = require('./../public/src/utils.js'), } async.each(uids, iterator, function(err) { - callback(userslugs); }); - - // @todo - rework this logic. it doesn't make much sense when you're going through - // each and then placing the check logic into the innermost callback. - // this is probably a situation where an async.method is ideal - /*for(var i=0, ii=uids.length; i= uids.length) { - callback(userslugs); - } - }); - }*/ } User.get_uid_by_email = function(email, callback) {