From 1b7ff116d13590b17dd45b51f8314c4b1ddc0fd8 Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Mon, 2 Mar 2020 15:22:57 +0100 Subject: [PATCH] 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. --- backend/src/schema/resolvers/passwordReset.js | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/schema/resolvers/passwordReset.js b/backend/src/schema/resolvers/passwordReset.js index 74c71e011..f399bc36e 100644 --- a/backend/src/schema/resolvers/passwordReset.js +++ b/backend/src/schema/resolvers/passwordReset.js @@ -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 `, {