1
0
Fork 0
forked from forgejo/forgejo

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
This commit is contained in:
Jonas Östanbäck 2017-05-29 09:35:47 +02:00 committed by Bo-Yi Wu
parent e0c6ab2d44
commit b93568cce4
14 changed files with 44 additions and 23 deletions

View file

@ -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,
}