mirror of
https://github.com/writefreely/writefreely
synced 2024-11-28 03:20:17 +00:00
Catch and log emailPasswordReset errors
This commit is contained in:
parent
8f02449ee8
commit
ed60aea39e
1 changed files with 6 additions and 1 deletions
|
@ -1359,7 +1359,12 @@ func handleResetPasswordInit(app *App, w http.ResponseWriter, r *http.Request) e
|
|||
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)
|
||||
returnLoc.Message += "?sent=1"
|
||||
|
|
Loading…
Reference in a new issue