This patch adds a different way to provide usernames, using template_preprocess_username.

This will make it possible for modules like the http://drupal.org/project/realname to overwrite the username used in drupalchat, otherwise normal username is used. This way no dependency is made.

Saw that somone had requested the same for the 6 branch:
#1050254: Real name instead of username in chat

CommentFileSizeAuthor
use_template_preprocess_username.patch3.02 KBolemsa

Comments

nikkubhai’s picture

sub...any updates?

super_romeo’s picture

Any updates?

darklrd’s picture

kmare’s picture

Hello,
with the latest update to beta3, I get an error creating a node with the following message:
"The username *Real Name* does not exist"
Reverting to beta2, everything is back to normal. Any ideas?

Thank you in advance

darklrd’s picture

Are you using RealName module?

kmare’s picture

yes.. the realname module is used (version 7.x-1.0-rc2). Also something weird is happening using the following simple snippet in a custom block:

<?php 
if ($user->uid) {
print l($user->name,'user/'.$user->uid);
}
?>

With drupalchat beta2, it would just report the username, but upgrading to beta3, it returned the realname without any other change on the site. Of course again, simply downgrading to beta2 returned everything to normal. I actually love the realname feature in drupalchat, but right now it looks like it's messing with other parts of the site.
Thank you again for the quick answer and of course this great module :)

darklrd’s picture

Have you upgraded the version of realname module as well?

kmare’s picture

nope, not since 2011-Jul-24 (latest stable version of realname 7.x-1.0-rc2). The only thing that was changed was the upgrade to beta3 from beta2 of drupalchat.

darklrd’s picture

darklrd’s picture

Try drupalchat 7.x-1.0-beta4. Thanks.

kmare’s picture

wow, that was fast! thanks a lot, I just upgraded to beta4 and everything looks like it's working properly again.
Thank you again :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.