Catch and log emailPasswordReset errors

pull/777/head
Matt Baer 1 year ago
parent 8f02449ee8
commit ed60aea39e
  1. 7
      account.go

@ -1359,7 +1359,12 @@ func handleResetPasswordInit(app *App, w http.ResponseWriter, r *http.Request) e
return returnLoc return returnLoc
} }
emailPasswordReset(app, u.EmailClear(app.keys), token) err = emailPasswordReset(app, u.EmailClear(app.keys), token)
if err != nil {
log.Error("Error emailing password reset: %s", err)
addSessionFlash(app, w, r, ErrInternalGeneral.Message, nil)
return returnLoc
}
addSessionFlash(app, w, r, "We sent an email to the address associated with this account.", nil) addSessionFlash(app, w, r, "We sent an email to the address associated with this account.", nil)
returnLoc.Message += "?sent=1" returnLoc.Message += "?sent=1"

Loading…
Cancel
Save