Update user.updatedAt when password is reset

- this is updating the user node, so it should update the updatedAt.
we recently ran into an issue where we weren't sure if a user had
successfully changed their password with the passwordReset, and needed
to look into it further to see if the PasswordReset had been used or not
to tell if it was successful.
This commit is contained in:
mattwr18 2020-03-02 15:22:57 +01:00
parent decc0dceb4
commit 1b7ff116d1

View File

@ -22,6 +22,7 @@ export default {
WHERE duration.between(passwordReset.issuedAt, datetime()).days <= 0 AND passwordReset.usedAt IS NULL
SET passwordReset.usedAt = datetime()
SET user.encryptedPassword = $encryptedNewPassword
SET user.updatedAt = toString(datetime())
RETURN passwordReset
`,
{