mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-29 22:56:37 -04:00
owner_reset_hex.go: check for SMTP configuration before queries
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user