I would like to have users' Real Name (as supplied by the Realname module) show instead of the 'Username' on group chats - right now it looks like, at some point during the creation of a chat message, the $message->name is filled with the user's username, but is there a way to either hook into the username as displayed by RealName, or retheme the username in general?

Thanks for a great module!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sylvaticus’s picture

Same request here.. I have a vague memory of some other cases where the realname wasn't displayed properly because the call made by a certain module to retrieve the username wasn't the best-practice one but a more "direct" call that was skipping the realname modifications..

[edit]
On the Realname project they state:

Other Modules
Almost all other contributed modules can properly display the Real Name if they change their code to use theme('username', ...) rather than just grabbing the user name from some object. We simply cannot be adding specialized support for thousands of contributed modules, especially when the solution is so simple (and Drupal-correct).

[/edit]

greggles’s picture

Category: support » task
Status: Active » Postponed (maintainer needs more info)

Can you post a screenshot of where the realname module doesn't do it's magic?

That would help pinpoint where the call to theme('username' isn't happening. Looking at the code I see that it is using the proper theme('username' in most cases.

geerlingguy’s picture

Status: Postponed (maintainer needs more info) » Active
FileSize
33.64 KB

Attached is a screenshot from a chat room message listing on a private site of mine. All the names displayed are the user names of the users, rather than the 'Real Name' values.

For example - user archstl is displayed as "Archdiocese of St. Louis" everywhere else on the site, and even in the list of active chat participants. But in the chat itself, the name appears as "archstl", the username.

greggles’s picture

Title: Display Realname in chat rooms, rather than user's username » Display Realname in chats, rather than user's username

OK, that makes sense. Thanks!

sylvaticus’s picture

FileSize
53.63 KB

here is an other screenshot.. "X000097" is the username (not very nice, is it??) and "ANTONELLO" is the realname.

[OT]: do you know how to receive email notification of new posts??[/OT]

jct’s picture

This appears to be related to the issue http://drupal.org/node/488360. The theme_chatroom_message_username function in chatroom.theme.inc is still using l(...).

Anonymous’s picture

thanks for report.