success message on password reset

This commit is contained in:
Evert Prants 2017-11-30 23:56:27 +02:00
parent 34a81d7923
commit f8ed8e244d
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -419,6 +419,8 @@ router.post('/login/reset', accountLimiter, csrfValidation, wrap(async (req, res
try {
await API.User.Reset.reset(email)
req.flash('message', {error: false, text: 'We\'ve sent a link to your email address. Please check spam folders too!'})
res.redirect('/login/reset?success=true')
} catch (e) {
return formError(req, res, e.message)