more slickness tweaks for demonstration purposes

This commit is contained in:
Michael Quigley
2022-12-07 12:24:00 -05:00
parent f12868c116
commit 362b8c2b84
5 changed files with 19 additions and 11 deletions

View File

@@ -70,9 +70,13 @@ func (self *inviteHandler) Handle(params account.InviteParams) middleware.Respon
return account.NewInviteInternalServerError()
}
if err := sendVerificationEmail(params.Body.Email, token); err != nil {
logrus.Errorf("error sending verification email for '%v': %v", params.Body.Email, err)
return account.NewInviteInternalServerError()
if cfg.Email != nil && cfg.Registration != nil {
if err := sendVerificationEmail(params.Body.Email, token); err != nil {
logrus.Errorf("error sending verification email for '%v': %v", params.Body.Email, err)
return account.NewInviteInternalServerError()
}
} else {
logrus.Errorf("'email' and 'registration' configuration missing; skipping registration email")
}
logrus.Infof("account request for '%v' has registration token '%v'", params.Body.Email, ar.Token)