In PHP 5 objects are passed by reference - which means that in template_preprocess_user_picture_realname() when the realname is assigned as the name on $account it leaks out in to other code - which gives me some issues with other code thinking that the realname is the username.

I think I have read some related issues somwehere in the issue queue - but I can't find it right now so I'm attaching a patch for it here.

It fixes the problem I had.

Comments

Rob T’s picture

I'm shocked I haven't seen this come up before. Thanks for posting your patch.

voxpelli’s picture

Status: Active » Needs review
sgabe’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm this, patch looks good and applies fine.

dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS. Thanks!
http://drupal.org/cvs?commit=442264

Status: Fixed » Closed (fixed)

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