You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2016/02/15 11:33:35 UTC
ignite git commit: IGNITE-2648 Add send email.
Repository: ignite
Updated Branches:
refs/heads/ignite-843-rc2 77fdb37f8 -> 053ba4479
IGNITE-2648 Add send email.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/053ba447
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/053ba447
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/053ba447
Branch: refs/heads/ignite-843-rc2
Commit: 053ba4479339d558e7cd128896bf6826e52df9c9
Parents: 77fdb37
Author: Andrey <an...@gridgain.com>
Authored: Mon Feb 15 17:33:54 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Mon Feb 15 17:33:54 2016 +0700
----------------------------------------------------------------------
.../src/main/js/serve/routes/public.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/053ba447/modules/control-center-web/src/main/js/serve/routes/public.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/routes/public.js b/modules/control-center-web/src/main/js/serve/routes/public.js
index 7cbdb8d..829e9d6 100644
--- a/modules/control-center-web/src/main/js/serve/routes/public.js
+++ b/modules/control-center-web/src/main/js/serve/routes/public.js
@@ -136,7 +136,16 @@ module.exports.factory = function(express, passport, nodemailer, settings, mongo
.then((account) => {
res.sendStatus(200);
- //_sendMail(account, '', '');
+ account.resetPasswordToken = _randomString();
+
+ account.save()
+ .then(() =>
+ _sendMail(account, `Thanks for signing up for ${settings.smtp.username}.`,
+ `Hello ${account.username}!\n\n` +
+ `You are receiving this e-mail because you (or someone else) signing up on the ${settings.smtp.username}.\n\n` +
+ 'If you did not request this, please ignore this email.\n' +
+ 'You may reset password by clicking on the following link, or paste this into your browser:\n\n' +
+ 'http://' + req.headers.host + '/password/reset?token=' + account.resetPasswordToken));
})
.catch((err) => {
res.status(401).send(err.message);