From 154d0160bceaedee58f059fca1cd5a324b02c651 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 26 Aug 2013 11:58:52 -0400 Subject: [PATCH] closes #200 --- src/meta.js | 1 + src/user.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/meta.js b/src/meta.js index cc84b964c1..9b0660b70b 100644 --- a/src/meta.js +++ b/src/meta.js @@ -118,5 +118,6 @@ var utils = require('./../public/src/utils.js'), } } + }(exports)); diff --git a/src/user.js b/src/user.js index b1a8ebccfc..8a5f37f0f3 100644 --- a/src/user.js +++ b/src/user.js @@ -215,7 +215,7 @@ var utils = require('./../public/src/utils.js'), return next(null, true); } - User.getUserField(uid, 'email', function(email) { + User.getUserField(uid, 'email', function(err, email) { if(email !== data['email']) { User.isEmailAvailable(data['email'], function(available) { if(!available) { @@ -298,7 +298,7 @@ var utils = require('./../public/src/utils.js'), return; } - User.getUserField(uid, 'password', function(user_password) { + User.getUserField(uid, 'password', function(err, user_password) { bcrypt.compare(data.currentPassword, user_password, function(err, res) { if(err) { console.log(err); @@ -578,7 +578,7 @@ var utils = require('./../public/src/utils.js'), } User.sendPostNotificationToFollowers = function(uid, tid, pid) { - User.getUserField(uid, 'username', function(username) { + User.getUserField(uid, 'username', function(err, username) { RDB.smembers('followers:' + uid, function(err, followers) { topics.getTopicField(tid, 'slug', function(err, slug) { var message = username + ' made a new post'; @@ -652,7 +652,7 @@ var utils = require('./../public/src/utils.js'), } function iterator(uid, callback) { - User.getUserField(uid, 'username', function(username) { + User.getUserField(uid, 'username', function(err, username) { usernames.push(username); callback(null); }); @@ -671,7 +671,7 @@ var utils = require('./../public/src/utils.js'), } function iterator(uid, callback) { - User.getUserField(uid, 'userslug', function(userslug) { + User.getUserField(uid, 'userslug', function(err, userslug) { userslugs.push(userslug); callback(null); });