diff options
author | Jonas Östanbäck <cez81@users.noreply.github.com> | 2017-05-29 09:35:47 +0200 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-05-29 02:35:47 -0500 |
commit | b93568cce4717abd97f1f92341ce9fdf331a7e98 (patch) | |
tree | 9234c805be991b8d1876bb4641d07b1f6f1251c8 /models | |
parent | e0c6ab2d44d17b72a7ea6f8b4c829c42baeaae3b (diff) | |
download | gitea-b93568cce4717abd97f1f92341ce9fdf331a7e98.tar.gz gitea-b93568cce4717abd97f1f92341ce9fdf331a7e98.zip |
xxx_active_code_live setting in printed in hours and minutes instead … (#1814)
* xxx_active_code_live setting in printed in hours and minutes instead of just hours
* Update app.ini description of xxx_code_lives settings
Diffstat (limited to 'models')
-rw-r--r-- | models/mail.go | 6 |
1 files changed, 3 insertions, 3 deletions
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, } |