mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03: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
@ -112,6 +112,7 @@ function ghostLocals(req, res, next) {
|
|||||||
_.extend(res.locals, {
|
_.extend(res.locals, {
|
||||||
currentUser: {
|
currentUser: {
|
||||||
name: currentUser.attributes.name,
|
name: currentUser.attributes.name,
|
||||||
|
email: currentUser.attributes.email,
|
||||||
image: currentUser.attributes.image
|
image: currentUser.attributes.image
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<li id="usermenu" class="subnav">
|
<li id="usermenu" class="subnav">
|
||||||
<a href="#" data-toggle="ul" class="dropdown">
|
<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" />
|
<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>
|
</a>
|
||||||
<ul class="overlay">
|
<ul class="overlay">
|
||||||
<li class="usermenu-profile"><a href="/ghost/settings/user/">Your Profile</a></li>
|
<li class="usermenu-profile"><a href="/ghost/settings/user/">Your Profile</a></li>
|
||||||
|
Loading…
Reference in New Issue
Block a user