Updating email on profile page will correctly update it in the databse. Fixes issue #25
parent
70d550bd77
commit
967ab7fe0a
|
@ -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 || '';
|
||||
|
|
Loading…
Reference in New Issue