diff --git a/models/mail.go b/models/mail.go index 31ac4a3a5a7d..4f2bd548f79e 100644 --- a/models/mail.go +++ b/models/mail.go @@ -47,7 +47,7 @@ func SendTestMail(email string) error { // SendUserMail sends a mail to the user func SendUserMail(c *macaron.Context, u *User, tpl base.TplName, code, subject, info string) { data := map[string]interface{}{ - "Username": u.DisplayName(), + "DisplayName": u.DisplayName(), "ActiveCodeLives": base.MinutesToFriendly(setting.Service.ActiveCodeLives, c.Locale.Language()), "ResetPwdCodeLives": base.MinutesToFriendly(setting.Service.ResetPwdCodeLives, c.Locale.Language()), "Code": code, @@ -79,7 +79,7 @@ func SendResetPasswordMail(c *macaron.Context, u *User) { // SendActivateEmailMail sends confirmation email to confirm new email address func SendActivateEmailMail(c *macaron.Context, u *User, email *EmailAddress) { data := map[string]interface{}{ - "Username": u.DisplayName(), + "DisplayName": u.DisplayName(), "ActiveCodeLives": base.MinutesToFriendly(setting.Service.ActiveCodeLives, c.Locale.Language()), "Code": u.GenerateEmailActivateCode(email.Email), "Email": email.Email, @@ -101,7 +101,8 @@ func SendActivateEmailMail(c *macaron.Context, u *User, email *EmailAddress) { // SendRegisterNotifyMail triggers a notify e-mail by admin created a account. func SendRegisterNotifyMail(c *macaron.Context, u *User) { data := map[string]interface{}{ - "Username": u.DisplayName(), + "DisplayName": u.DisplayName(), + "Username": u.Name, } var content bytes.Buffer diff --git a/templates/mail/auth/activate.tmpl b/templates/mail/auth/activate.tmpl index 0f6afc196bc2..37fdbd7c7ce4 100644 --- a/templates/mail/auth/activate.tmpl +++ b/templates/mail/auth/activate.tmpl @@ -2,11 +2,11 @@
-Hi {{.Username}}, thanks for registering at {{AppName}}!
+Hi {{.DisplayName}}, thanks for registering at {{AppName}}!
Please click the following link to activate your account within {{.ActiveCodeLives}}:
{{AppUrl}}user/activate?code={{.Code}}
Not working? Try copying and pasting it to your browser.
diff --git a/templates/mail/auth/activate_email.tmpl b/templates/mail/auth/activate_email.tmpl index 7c47aaa7b8fc..ebcaa0ee79e0 100644 --- a/templates/mail/auth/activate_email.tmpl +++ b/templates/mail/auth/activate_email.tmpl @@ -2,11 +2,11 @@ -Hi {{.Username}},
+Hi {{.DisplayName}},
Please click the following link to verify your email address within {{.ActiveCodeLives}}:
{{AppUrl}}user/activate_email?code={{.Code}}&email={{.Email}}
Not working? Try copying and pasting it to your browser.
diff --git a/templates/mail/auth/register_notify.tmpl b/templates/mail/auth/register_notify.tmpl index 4c2a9c43ad3e..4ee25329c47b 100644 --- a/templates/mail/auth/register_notify.tmpl +++ b/templates/mail/auth/register_notify.tmpl @@ -2,11 +2,11 @@ -Hi {{.Username}}, this is your registration confirmation email for {{AppName}}!
+Hi {{.DisplayName}}, this is your registration confirmation email for {{AppName}}!
You can now login via username: {{.Username}}.
If this account has been created for you, please reset your password first.
diff --git a/templates/mail/auth/reset_passwd.tmpl b/templates/mail/auth/reset_passwd.tmpl index 0a09c47e8508..5fb98c7819fb 100644 --- a/templates/mail/auth/reset_passwd.tmpl +++ b/templates/mail/auth/reset_passwd.tmpl @@ -2,11 +2,11 @@ -Hi {{.Username}},
+Hi {{.DisplayName}},
Please click the following link to reset your password within {{.ResetPwdCodeLives}}:
{{AppUrl}}user/reset_password?code={{.Code}}
Not working? Try copying and pasting it to your browser.