Skip to content

[5.x]: CP Account menu shows blank space where email address should be #15475

@antcooper

Description

@antcooper

What happened?

Description

Users other than the initial admin user account have a blank space where the email address should be to link to their profile page.

CleanShot 2024-08-05 at 11 18 08@2x

Steps to reproduce

  1. We have useEmailAsUsername(true) in our general.php config.
  2. Create a new user in the 'Client' group that has control panel access.
  3. Login as that user and there's no text inside the anchor link to their Profile page.

Expected behavior

Users should see their email address in the menu.

Actual behavior

This section is blank. It seems that currentUser.username has no value.

Users can login without issue, but looking in the database the username column is blank for everyone apart from the first admin user.

We created the site whilst Craft 5 was in beta, but have applied updates and now on 5.2.9

Craft CMS version

5.2.9

PHP version

8.3.9

Operating system and version

Linux 6.1.0-22-amd64

Database type and version

MySQL 28.1

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.1-32)

Installed plugins and versions

"craftcms/ckeditor": "4.1.0",
"nystudio107/craft-seomatic": "5.1.1",
"nystudio107/craft-vite": "5.0.0",
"putyourlightson/craft-sprig": "3.2.0",
"servd/craft-asset-storage": "4.0.6",

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions