diff options
author | mrsdizzie <info@mrsdizzie.com> | 2019-04-04 03:52:48 -0400 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-04-04 10:52:48 +0300 |
commit | 04003d9dc7f79bf1ce6eb30db50d9f41d85d362f (patch) | |
tree | b053a1f5f924914cc7dccb4a5f054b71f94dd691 /templates/mail/auth/register_notify.tmpl | |
parent | 3f4e2d9d376b553ee931e1539174372ed550dd27 (diff) | |
download | gitea-04003d9dc7f79bf1ce6eb30db50d9f41d85d362f.tar.gz gitea-04003d9dc7f79bf1ce6eb30db50d9f41d85d362f.zip |
Make distinction between DisplayName and Username in email templates (#6495)
* Make distinction between DisplayName and Username in email templates
Store the actual username in the variable named Username and store the
separate DisplayName in another variable. This allows us to access the
actual username when we need, which currently fails if a user has set a
full name.
Fixes #6161
* Use u.Name directly
No need for extra function, also change use in all mail sending
functions here
* Don't include Username when not used
Diffstat (limited to 'templates/mail/auth/register_notify.tmpl')
-rw-r--r-- | templates/mail/auth/register_notify.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/mail/auth/register_notify.tmpl b/templates/mail/auth/register_notify.tmpl index 4c2a9c43ad..4ee25329c4 100644 --- a/templates/mail/auth/register_notify.tmpl +++ b/templates/mail/auth/register_notify.tmpl @@ -2,11 +2,11 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>{{.Username}}, welcome to {{AppName}}</title> + <title>{{.DisplayName}}, welcome to {{AppName}}</title> </head> <body> - <p>Hi <b>{{.Username}}</b>, this is your registration confirmation email for {{AppName}}!</p> + <p>Hi <b>{{.DisplayName}}</b>, this is your registration confirmation email for {{AppName}}!</p> <p>You can now login via username: {{.Username}}.</p> <p><a href="{{AppUrl}}user/login">{{AppUrl}}user/login</a></p> <p>If this account has been created for you, please <a href="{{AppUrl}}user/forgot_password">reset your password</a> first.</p> |