diff --git a/controllers/user.js b/controllers/user.js index f780c41b6c..97ea084550 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -428,7 +428,8 @@ exports.getReset = function(req, res) { return res.redirect('/forgot'); } res.render('account/reset', { - title: 'Password Reset' + title: 'Password Reset', + token: req.params.token }); }); }; @@ -590,7 +591,7 @@ exports.postForgot = function(req, res, next) { '/reset/', token, '\n\n', - 'If you did not request this, please ignore this email and', + 'If you did not request this, please ignore this email and\n', 'your password will remain unchanged.\n' ].join('') }; diff --git a/views/account/reset.jade b/views/account/reset.jade index fab364d654..cfea79e93f 100644 --- a/views/account/reset.jade +++ b/views/account/reset.jade @@ -1,9 +1,9 @@ extends ../layout block content - .col-sm-8.col-sm-offset-2 - form(action='/post/reset/', method='POST') - legend Reset Password + .col-sm-8.col-sm-offset-2.jumbotron + form(action='/reset/#{token}', method='POST') + h1 Reset Password input(type='hidden', name='_csrf', value=_csrf) .form-group label(for='password') New Password