diff --git a/routes/public.ts b/routes/public.ts index 43b28e8a756df5fa8b942167dff51714e89d476d..f535b5e205b862e3b582ec1b5abb6ee0e467bef5 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+'