From b93568cce4717abd97f1f92341ce9fdf331a7e98 Mon Sep 17 00:00:00 2001 From: Jonas Östanbäck Date: Mon, 29 May 2017 09:35:47 +0200 Subject: xxx_active_code_live setting in printed in hours and minutes instead … (#1814) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * xxx_active_code_live setting in printed in hours and minutes instead of just hours * Update app.ini description of xxx_code_lives settings --- models/mail.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'models') diff --git a/models/mail.go b/models/mail.go index 211f2b5786..7ef73fc11d 100644 --- a/models/mail.go +++ b/models/mail.go @@ -47,8 +47,8 @@ func SendTestMail(email string) error { func SendUserMail(c *macaron.Context, u *User, tpl base.TplName, code, subject, info string) { data := map[string]interface{}{ "Username": u.DisplayName(), - "ActiveCodeLives": setting.Service.ActiveCodeLives / 60, - "ResetPwdCodeLives": setting.Service.ResetPwdCodeLives / 60, + "ActiveCodeLives": base.MinutesToFriendly(setting.Service.ActiveCodeLives), + "ResetPwdCodeLives": base.MinutesToFriendly(setting.Service.ResetPwdCodeLives), "Code": code, } @@ -79,7 +79,7 @@ func SendResetPasswordMail(c *macaron.Context, u *User) { func SendActivateEmailMail(c *macaron.Context, u *User, email *EmailAddress) { data := map[string]interface{}{ "Username": u.DisplayName(), - "ActiveCodeLives": setting.Service.ActiveCodeLives / 60, + "ActiveCodeLives": base.MinutesToFriendly(setting.Service.ActiveCodeLives), "Code": u.GenerateEmailActivateCode(email.Email), "Email": email.Email, } -- cgit v1.2.3