v1.18.x
Baris Usakli 12 years ago
parent dd40cbc139
commit 154d0160bc

@ -118,5 +118,6 @@ var utils = require('./../public/src/utils.js'),
} }
} }
}(exports)); }(exports));

@ -215,7 +215,7 @@ var utils = require('./../public/src/utils.js'),
return next(null, true); return next(null, true);
} }
User.getUserField(uid, 'email', function(email) { User.getUserField(uid, 'email', function(err, email) {
if(email !== data['email']) { if(email !== data['email']) {
User.isEmailAvailable(data['email'], function(available) { User.isEmailAvailable(data['email'], function(available) {
if(!available) { if(!available) {
@ -298,7 +298,7 @@ var utils = require('./../public/src/utils.js'),
return; 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) { bcrypt.compare(data.currentPassword, user_password, function(err, res) {
if(err) { if(err) {
console.log(err); console.log(err);
@ -578,7 +578,7 @@ var utils = require('./../public/src/utils.js'),
} }
User.sendPostNotificationToFollowers = function(uid, tid, pid) { 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) { RDB.smembers('followers:' + uid, function(err, followers) {
topics.getTopicField(tid, 'slug', function(err, slug) { topics.getTopicField(tid, 'slug', function(err, slug) {
var message = username + ' made a new post'; var message = username + ' made a new post';
@ -652,7 +652,7 @@ var utils = require('./../public/src/utils.js'),
} }
function iterator(uid, callback) { function iterator(uid, callback) {
User.getUserField(uid, 'username', function(username) { User.getUserField(uid, 'username', function(err, username) {
usernames.push(username); usernames.push(username);
callback(null); callback(null);
}); });
@ -671,7 +671,7 @@ var utils = require('./../public/src/utils.js'),
} }
function iterator(uid, callback) { function iterator(uid, callback) {
User.getUserField(uid, 'userslug', function(userslug) { User.getUserField(uid, 'userslug', function(err, userslug) {
userslugs.push(userslug); userslugs.push(userslug);
callback(null); callback(null);
}); });

Loading…
Cancel
Save