diff --git a/public/templates/accountedit.tpl b/public/templates/accountedit.tpl index ac9c896bb5..7b727c2368 100644 --- a/public/templates/accountedit.tpl +++ b/public/templates/accountedit.tpl @@ -79,8 +79,8 @@ -
-
+
+
@@ -132,7 +132,11 @@
-
+ +
+
+ +
diff --git a/src/groups.js b/src/groups.js index c6f7098774..54fefba7f7 100644 --- a/src/groups.js +++ b/src/groups.js @@ -29,9 +29,7 @@ var async = require('async'), if (err) return next(err); async.map(uids, function(uid, next) { - User.getUserData(uid, function(data) { - next(null, data); - }); + User.getUserData(uid, next); }, function(err, users) { next(err, users); }); diff --git a/src/routes/user.js b/src/routes/user.js index 7f7e00cbf5..9d55d5f2f2 100644 --- a/src/routes/user.js +++ b/src/routes/user.js @@ -14,7 +14,7 @@ var user = require('./../user.js'), if(!req.params.uid) return res.redirect('/404'); - user.getUserData(req.params.uid, function(data) { + user.getUserData(req.params.uid, function(err, data) { if(data) { res.send(data); } else { @@ -406,7 +406,7 @@ var user = require('./../user.js'), return; } - user.getUserData(uid, function(data) { + user.getUserData(uid, function(err, data) { if(data) { data.joindate = utils.relativeTime(data.joindate); diff --git a/src/user.js b/src/user.js index 3f5444e58f..49bc63cce8 100644 --- a/src/user.js +++ b/src/user.js @@ -111,7 +111,7 @@ var utils = require('./../public/src/utils.js'), if(exists === 1) { console.log('deleting uid ' + uid); - User.getUserData(uid, function(data) { + User.getUserData(uid, function(err, data) { RDB.del('username:' + data['username'] + ':uid'); RDB.del('email:' + data['email'] +':uid'); RDB.del('userslug:'+ data['userslug'] +':uid'); @@ -175,15 +175,11 @@ var utils = require('./../public/src/utils.js'), User.getUserData = function(uid, callback) { RDB.hgetall('user:' + uid, function(err, data) { - if(err === null) { - if(data) { - if(data['password']) - delete data['password']; - } - callback(data); - } else { - console.log(err); + + if(data && data['password']) { + delete data['password']; } + callback(err, data); }); } @@ -340,7 +336,7 @@ var utils = require('./../public/src/utils.js'), } function iterator(uid, callback) { - User.getUserData(uid, function(userData) { + User.getUserData(uid, function(err, userData) { if(userData) { data.push(userData); } @@ -576,7 +572,7 @@ var utils = require('./../public/src/utils.js'), } function iterator(uid, callback) { - User.getUserData(uid, function(userData) { + User.getUserData(uid, function(err, userData) { returnData.push(userData); callback(null);