From 744144b90d1d58a9d4abb1fae804ab5e6dfc33d2 Mon Sep 17 00:00:00 2001 From: Rosanny Date: Mon, 6 Sep 2021 16:40:38 +0200 Subject: [PATCH] an update on reset password --- routes/public.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/routes/public.ts b/routes/public.ts index 43b28e8a..f535b5e2 100644 --- a/routes/public.ts +++ b/routes/public.ts @@ -237,9 +237,11 @@ export = function (app:any, config:any, lang:string) { // encrypt password bcrypt.genSalt(saltRounds, function(err, salt) { bcrypt.hash(newPwd, salt, async function(err:any, hash) { - var credentialData = { + let credentialData = { password: hash, - user_id: user.user_id + user_id: user.user_id, + resetPasswordToken: null, + resetPasswordExpires: null } // update password let result = await methods.updateCredential(credentialData) @@ -248,7 +250,7 @@ export = function (app:any, config:any, lang:string) { res.flash('error', "Datenbankfehler: Passwort kann nicht geƤndert werden.") } else { res.flash('success', "Passwort aktualisiert!") - // send notifiaction email + // send notification email mailer.options.to = user.email mailer.options.subject = constants.updatePasswordMailSubject mailer.options.html = constants.updatePasswordMailContent+'
'+constants.mailSignature+'
' -- GitLab