Fixed password reset. The check on the expiration date was incorrect.

This commit is contained in:
Valerio Santinelli
2015-07-15 12:28:13 +02:00
parent ffd0d7e905
commit 9343806cd7

View File

@ -425,7 +425,7 @@ module.exports = function(app) {
{ {
where: { where: {
resetPasswordToken: req.params.token, resetPasswordToken: req.params.token,
resetPasswordExpires: Date.now() resetPasswordExpires: { gte: Date.now() }
} }
}, },
function(err, user) { function(err, user) {
@ -462,7 +462,7 @@ module.exports = function(app) {
{ {
where: { where: {
resetPasswordToken: req.params.token, resetPasswordToken: req.params.token,
resetPasswordExpires: Date.now() resetPasswordExpires: { gte: Date.now() }
} }
}, },
function(err, user) { function(err, user) {