aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/controllers/users.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-15 10:56:13 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-15 10:56:13 +0200
commitbf30442ce8615b757d2e1b0859800c906e39a7c9 (patch)
treefa8447b868318c0577343ac1c185912d78c2dce3 /controllers/users.js
parent now takes email, not username (diff)
downloadDivid-bf30442ce8615b757d2e1b0859800c906e39a7c9.tar.gz
random password is now generated for invited users
Diffstat (limited to 'controllers/users.js')
-rw-r--r--controllers/users.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/controllers/users.js b/controllers/users.js
index fbd2eb1..f3568a4 100644
--- a/controllers/users.js
+++ b/controllers/users.js
@@ -129,7 +129,7 @@ exports.postProjectParticipants = function(req, res) {
var newUser = new User();
newUser.email = mailAddress;
newUser.status = 1;
-
+ newUser.password = newUser.generateRandomToken(32);
newUser.save(function(err) {
if (err) return res.render('projectParticipants', { title: 'Nytt prosjekt - en feil oppstod', loggedin: true });
console.log('made new user ' + newUser._id);