diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-02-27 18:06:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 18:06:38 +0800 |
commit | 7950f2d17d97c37fca22b88d48056de1c00b4d77 (patch) | |
tree | 962531de3ff86417dc06cc4ece6eb22176fb5b8c /internal/email | |
parent | cf3d55fa10f9b16d0ba996f8129f50743b2cd4ad (diff) |
conf: overhaul auth and user settings (#5942)
* conf: overhaul auth and user settings
* ci: update travis Go versions
Diffstat (limited to 'internal/email')
-rw-r--r-- | internal/email/email.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/email/email.go b/internal/email/email.go index 3e01a28d..917e6665 100644 --- a/internal/email/email.go +++ b/internal/email/email.go @@ -105,8 +105,8 @@ type Issue interface { func SendUserMail(c *macaron.Context, u User, tpl, code, subject, info string) { data := map[string]interface{}{ "Username": u.DisplayName(), - "ActiveCodeLives": conf.Service.ActiveCodeLives / 60, - "ResetPwdCodeLives": conf.Service.ResetPwdCodeLives / 60, + "ActiveCodeLives": conf.Auth.ActivateCodeLives / 60, + "ResetPwdCodeLives": conf.Auth.ResetPasswordCodeLives / 60, "Code": code, } body, err := render(tpl, data) @@ -133,7 +133,7 @@ func SendResetPasswordMail(c *macaron.Context, u User) { func SendActivateEmailMail(c *macaron.Context, u User, email string) { data := map[string]interface{}{ "Username": u.DisplayName(), - "ActiveCodeLives": conf.Service.ActiveCodeLives / 60, + "ActiveCodeLives": conf.Auth.ActivateCodeLives / 60, "Code": u.GenerateEmailActivateCode(email), "Email": email, } |