Personally I feel it is not a good idea to involve Username in messages.
Is there anyway to replace Username by Display Name?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- iionly@iionly

iionly - 0 likes
- woodpecker@woodpecker

woodpecker - 0 likes
- iionly@iionly

iionly - 0 likes
- woodpecker@woodpecker

woodpecker - 0 likes
- iionly@iionly

iionly - 0 likes
- woodpecker@woodpecker

woodpecker - 0 likes
You must log in to post replies.What messages are you referring to?
The messages sent by Elgg core should already use the display name and not the username in the message body to address the recipient. Have you come across a message where this isn't the case?
If a plugin sends messages with username instead of display name in the body you could change the content by modifying the code that creates the message content. In this case the username would be most likely added in the message by $user->username as a parameter within an elgg_echo() call (assuming here that $user is the variable holding the user entity). If you just replace $user->username with $user->name in this call.
Thanks iionly
When I click on the mail icon to compose a message, it asks for username (no member knows another's username, at least to begin with.. When I click on a name under Sent Messages, Elgg automatically puts the username.
"If you just replace $user->username with $user->name in this call."
Please tell me where do I make this change? I use the default Elgg theme that came with the package.
Warmest.
Now I understand. But it will also work if you start to enter the display name into the field. I would say it's only the help text below the input field ('Write recipient's username here.') that is misleading. I guess it would be better if it would say 'Write recipient's display name or username here.'
It doesn't accept the display name.
Error message: We couldn't find the recipient's name.
Works for me both on Elgg 1.X and current 2.0 beta. But it must be noted that only users who are friends are offered by the autocomplete feature. If it doesn't work for you maybe some 3rd party plugin is changing the default behaviour.
"But it must be noted that only users who are friends are offered by the autocomplete feature".
Thanks, iionly. I overlooked that :)
Still there is a problem. Wherever I click on a member icon (be it under Newest Members or on Blogs), It first shows a block in the following format:
displayname
@username
Only when I click on it, I reach the person's profile. And the "@username" is even visible to the public! How to get rid of this element?