diff --git a/src/user.js b/src/user.js index 750c88c242..ca7a9a8b12 100644 --- a/src/user.js +++ b/src/user.js @@ -340,26 +340,29 @@ var config = require('../config.js'), }; User.get_user_postdetails = function(uids, callback) { - + + var multi_queue = RDB.db.multi(); + + for(var i=0, ii=uids.length; i= uids.length) { - - callback({ - 'username':usernames, - 'rep':reputations - }); - } + multi_queue.exec(function (err, replies) { + + replies.forEach(function (reply, index) { + usernames.push(reply[0]); + reputations.push(reply[1]); }); - } + + callback({ + 'username':usernames, + 'rep':reputations + }); + + }); } User.get_uid_by_email = function(email, callback) {