ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [15/50] ignite git commit: IGNITE-2648 Add send email.
Date Tue, 16 Feb 2016 15:14:32 GMT
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-rc3
Commit: 053ba4479339d558e7cd128896bf6826e52df9c9
Parents: 77fdb37
Author: Andrey <anovikov@gridgain.com>
Authored: Mon Feb 15 17:33:54 2016 +0700
Committer: Andrey <anovikov@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);


Mime
View raw message