From 7950f2d17d97c37fca22b88d48056de1c00b4d77 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Thu, 27 Feb 2020 18:06:38 +0800 Subject: conf: overhaul auth and user settings (#5942) * conf: overhaul auth and user settings * ci: update travis Go versions --- internal/email/email.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/email') 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, } -- cgit v1.2.3