owner_reset_hex.go: check for SMTP configuration before queries
This commit is contained in:
parent
130ee48e7e
commit
5fe785f2fd
@ -10,6 +10,10 @@ func ownerSendResetHex(email string) error {
|
||||
return errorMissingField
|
||||
}
|
||||
|
||||
if !smtpConfigured {
|
||||
return errorSmtpNotConfigured
|
||||
}
|
||||
|
||||
o, err := ownerGetByEmail(email)
|
||||
if err != nil {
|
||||
if err == errorNoSuchEmail {
|
||||
@ -22,10 +26,6 @@ func ownerSendResetHex(email string) error {
|
||||
}
|
||||
}
|
||||
|
||||
if !smtpConfigured {
|
||||
return errorSmtpNotConfigured
|
||||
}
|
||||
|
||||
resetHex, err := randomHex(32)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user