Updating email on profile page will correctly update it in the databse. Fixes issue #25

pull/2/head
Sahat Yalkabov 2014-01-30 17:29:06 -05:00
parent 70d550bd77
commit 967ab7fe0a
1 changed files with 1 additions and 2 deletions

View File

@ -120,9 +120,8 @@ exports.getAccount = function(req, res) {
exports.postUpdateProfile = function(req, res, next) {
User.findById(req.user.id, function(err, user) {
if (err) return next(err);
user.email = req.body.email || '';
user.profile.name = req.body.name || '';
user.profile.email = req.body.email || '';
user.profile.gender = req.body.gender || '';
user.profile.location = req.body.location || '';
user.profile.website = req.body.website || '';