Cms: Display current username inside CP's top right "My account" menu

Created on 26 Jul 2020  ·  3Comments  ·  Source: craftcms/cms

Description

When testing user account permissions, it would be helpful to know who you're currently logged in as (without having to hover over the menu to see the alt tag, or clicking through to the My Account page itself)

Maybe something like...

<div class="menu" data-align="right">
    <ul>
        <li class="light" style="font-size: 10px; padding: 8px 0">{{ currentUser.getName() }}</li>
        <li><a href="{{ url('myaccount') }}">{{ 'My Account'|t('app') }}</a></li>
        <li><a href="{{ url('logout') }}">{{ "Sign out"|t('app') }}</a></li>
    </ul>
</div>

image

Displaying the current username in the account dropdown is also an established design pattern — see examples below.

image

image

Thanks for considering my request :)

enhancement ui

Most helpful comment

Added for the next 3.5 release!

An account menu that displays the logged in user’s username and email

All 3 comments

Added for the next 3.5 release!

An account menu that displays the logged in user’s username and email

That was quick ⚡️

Craft 3.5 RC4 is out now with that change.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukebailey picture lukebailey  ·  3Comments

davist11 picture davist11  ·  3Comments

benface picture benface  ·  3Comments

angrybrad picture angrybrad  ·  3Comments

bitboxfw picture bitboxfw  ·  3Comments