Change user mention display name
Asked by David Hergert _PAYX_:

It appears the way User Mentions are displayed is driven off of the "User Display Name Attribute" in the User Directory Configuration, which we have set to "displayName" in AD. Our displayName attribute is in the format of "Lastname, Firstname" which doesn't look very nice when doing user mentions. And at this point, we can't change the format of our AD attribute.

So I followed this article, [](https://confluence.atlassian.com/pages/viewpage.action?pageId=296094848)<https://confluence.atlassian.com/pages/viewpage.action?pageId=296094848>which describes how you can change your User Directory config to make Confluence instead use "givenname + sn" for displaying user's names (by putting in a bogus attribute). I did that, resync'd the directory with AD, and restarted Confluence and all the user's Profile pages now show a nice "Firstname Lastname" for their Full Name, which is great. But...

When I go to do a user mention with "@", they still show up and auto-complete using the old "Lastname, Firstname" format. How do we get User Mention's to reflect an LDAP user's new Full Name?

Note: If I create a LOCAL Confluence user, and change his 'Full Name' (and clear the User Properties cache), it's friendly name in the User Mention reflects the change correctly. Just doesn't seem to work with LDAP users.

I have also submitted a JIRA issue regarding this, with a screenshot. <https://jira.atlassian.com/browse/CONF-34696>


Answers:
author: David Hergert _PAYX_
body: This has been confirmed a bug, and will be corrected when <https://jira.atlassian.com/browse/CONF-34696> is closed.

To get around this, you can do it by manually clearing your content indexes:

* Follow the article [LDAP: Changing the User Display Name Attribute to use the default givenname + sn](https://confluence.atlassian.com/pages/viewpage.action?pageId=296094848) and set the displayName attribute in your User Directory configuration to something fake like "bogusValue"
* Follow the instructions to [Rebuild the Content Indices from Scratch](https://confluence.atlassian.com/display/CONFKB/Rebuild+the+Content+Indices+from+Scratch), deleting your index files and then kick off a manual content re-index
* Give it a few hours (depending on your instance) to repopulate the index

After that, the user mentions will be in the format of givenname + sn.

comments: author: David Hergert _PAYX_
body: So changing the user's display name is still tied to a single LDAP attribute, unless you put in a dummy value at which point it will default to givenName + sn.

However, the re-indexing problem appears to have been corrected in 6.7 with the improved @mentions functionality, and simply re-synchronizing will update all mentions, so the above Jira issue can be closed.


author: Chag
body: have you tried clearing your cache in the browser?

comments: author: David Hergert _PAYX_
body: Yes, and different browsers.


author: Reinaldo Campos
body: I made it and doesn't work. Have you found how fix it?


author: Chag
body: dave posted a work around.


author: David Hergert _PAYX_
body: Sorry - I wasn't very clear. My answer above explains how to fix it administratively. Until then, the work around is to type the person's username like so: \[ \~username \] (minus the spaces)


Tags: mention

user-directory