If a user has a customer profile (i.e. ever filled out a shopping cart) the name in the profile is used everywhere their username is displayed.

This results in a lot of confusion for our moderators/admins. Because when they go to lookup a user in admin/people they're looking for the username that the user logs in with. But what's displayed is their "nice" name from their shipping address. I need to undo this override because it's way too confusing.

It doesn't look like anyone is doing this through theme_username(). Where is this display override happening?

2 Answers 2


Found it!

commerce_kickstart_user_username_alter() is overwriting usernames with the name provided in their addressbook.

I implemented my own hook_username_alter() to simply return $account->name.


Consider using the Real Name module to configure how display names are shown. It's a bit overkill because you just want it to be back to the username.

You could write your own lightweight module to theme the username back to the actual username. via theme_username`

Returns HTML for a username, potentially linked to the user's page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.