mirror of
https://github.com/writefreely/writefreely
synced 2025-02-16 07:48:24 +00:00
Correctly return on /reset submission when email isn't configured
This commit is contained in:
parent
ed60aea39e
commit
7b84dafea7
1 changed files with 5 additions and 0 deletions
|
@ -1321,6 +1321,11 @@ func doAutomatedPasswordChange(app *App, userID int64, newPass string) error {
|
|||
func handleResetPasswordInit(app *App, w http.ResponseWriter, r *http.Request) error {
|
||||
returnLoc := impart.HTTPError{http.StatusFound, "/reset"}
|
||||
|
||||
if !app.cfg.Email.Enabled() {
|
||||
// Email isn't configured, so there's nothing to do; send back to the reset form, where they'll get an explanation
|
||||
return returnLoc
|
||||
}
|
||||
|
||||
ip := spam.GetIP(r)
|
||||
alias := r.FormValue("alias")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue