1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-23 01:20:11 +00:00

store emails even if password resets are disabled

there are other reasons to store email addresses now, so this is no
longer a just requirement.
This commit is contained in:
Harvey Tindall 2020-11-03 21:20:38 +00:00
parent 493f10fa36
commit 47abf20e1d
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2

3
api.go
View File

@ -378,7 +378,8 @@ func (app *appContext) NewUser(gc *gin.Context) {
} }
} }
} }
if app.config.Section("password_resets").Key("enabled").MustBool(false) { // if app.config.Section("password_resets").Key("enabled").MustBool(false) {
if req.Email != "" {
app.storage.emails[id] = req.Email app.storage.emails[id] = req.Email
app.storage.storeEmails() app.storage.storeEmails()
} }