diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-05-23 14:26:43 +0200 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-05-23 14:26:43 +0200 |
commit | 6adeed3d61fa036008031b3ccdb906a678f1a75c (patch) | |
tree | 4fcb295f24952ac6854789b331db5fffa3bfe06a /controllers/users.js | |
parent | now loads participants and date (diff) | |
download | Divid-6adeed3d61fa036008031b3ccdb906a678f1a75c.tar.gz |
update status of user when mail is entered
Diffstat (limited to 'controllers/users.js')
-rw-r--r-- | controllers/users.js | 2 |
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'); }); |