update the reset password functionality and make the password reset form consistent with other such forms
This commit is contained in:
@ -428,7 +428,8 @@ exports.getReset = function(req, res) {
|
|||||||
return res.redirect('/forgot');
|
return res.redirect('/forgot');
|
||||||
}
|
}
|
||||||
res.render('account/reset', {
|
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/',
|
'/reset/',
|
||||||
token,
|
token,
|
||||||
'\n\n',
|
'\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'
|
'your password will remain unchanged.\n'
|
||||||
].join('')
|
].join('')
|
||||||
};
|
};
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
extends ../layout
|
extends ../layout
|
||||||
|
|
||||||
block content
|
block content
|
||||||
.col-sm-8.col-sm-offset-2
|
.col-sm-8.col-sm-offset-2.jumbotron
|
||||||
form(action='/post/reset/', method='POST')
|
form(action='/reset/#{token}', method='POST')
|
||||||
legend Reset Password
|
h1 Reset Password
|
||||||
input(type='hidden', name='_csrf', value=_csrf)
|
input(type='hidden', name='_csrf', value=_csrf)
|
||||||
.form-group
|
.form-group
|
||||||
label(for='password') New Password
|
label(for='password') New Password
|
||||||
|
Reference in New Issue
Block a user