aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-23 14:26:43 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-23 14:26:43 +0200
commit6adeed3d61fa036008031b3ccdb906a678f1a75c (patch)
tree4fcb295f24952ac6854789b331db5fffa3bfe06a
parentnow loads participants and date (diff)
downloadDivid-6adeed3d61fa036008031b3ccdb906a678f1a75c.tar.gz
update status of user when mail is entered
-rw-r--r--controllers/users.js2
1 files changed, 1 insertions, 1 deletions
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');
});