mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Added email to username if no name is given
Gets rid of generic "Ghost" - we know a user will always have an email address as it is a required field.
This commit is contained in:
parent
bf5ab32fe9
commit
78775f1976
2 changed files with 2 additions and 1 deletions
|
@ -112,6 +112,7 @@ function ghostLocals(req, res, next) {
|
|||
_.extend(res.locals, {
|
||||
currentUser: {
|
||||
name: currentUser.attributes.name,
|
||||
email: currentUser.attributes.email,
|
||||
image: currentUser.attributes.image
|
||||
}
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<li id="usermenu" class="subnav">
|
||||
<a href="#" data-toggle="ul" class="dropdown">
|
||||
<img class="avatar" src="{{#if currentUser.image}}{{currentUser.image}}{{else}}/shared/img/user-image.png{{/if}}" alt="Avatar" />
|
||||
<span class="name">{{#if currentUser.name}}{{currentUser.name}}{{else}}Ghost{{/if}}</span>
|
||||
<span class="name">{{#if currentUser.name}}{{currentUser.name}}{{else}}{{currentUser.email}}{{/if}}</span>
|
||||
</a>
|
||||
<ul class="overlay">
|
||||
<li class="usermenu-profile"><a href="/ghost/settings/user/">Your Profile</a></li>
|
||||
|
|
Loading…
Add table
Reference in a new issue