From 6adeed3d61fa036008031b3ccdb906a678f1a75c Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Thu, 23 May 2013 14:26:43 +0200 Subject: update status of user when mail is entered --- controllers/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/users.js b/controllers/users.js index 59780de..22a1cc6 100644 --- a/controllers/users.js +++ b/controllers/users.js @@ -119,7 +119,7 @@ exports.postRegisterEmail = function(req, res) { // if mail is in use.. if (user) return res.render('registerEmail', { title: 'Den e-posten er allerede i bruk. Vennligs registrer en annen.' }); - User.update({ _id: req.user._id }, { email: req.body.email }, function(err) { + User.update({ _id: req.user._id }, { email: req.body.email, status: 3 }, function(err) { if (err) return res.status(500).render('error', { title: '500', text: 'En serverfeil oppstod', error: err.stack }); return res.redirect('/dashboard'); }); -- cgit v1.2.3