First, cheers for creating a great module.

I have applied the code located here: http://drupal.org/node/122303#comment-204277

substituting the user name for a profile field I created called "profile_fullname". How can I substitute this value instead of the username throughout the module?

For example, when I go to send a mass email, have it prefilled with the user's real name instead of the username, and when the mails are sent out, have a confirmation print using the user's real names, instead of usernames.

I realize this could either be moderately easy to do, or very complicated. Please advise, and thank you again for a wonderful module!

Comments

anonymous562’s picture

Status: Active » Fixed

Fixed, thanks to user nevets. Change this line:

 '#default_value' => $user->uid ? $user->name : '',

to this:

 '#default_value' => $user->uid ? theme('username', $user, FALSE) : '',
Anonymous’s picture

Status: Fixed » Closed (fixed)
Anonymous’s picture

Version: 5.x-1.5 » 6.x-1.0-beta2
Status: Closed (fixed) » Closed (won't fix)

.

pilotmattk’s picture

Drop this in there

'#default_value' => $user->uid ? theme('username', $user, array('plain' => TRUE)) : '',

instead of this

'#default_value' => $user->uid ? $user->name : '',

or this

'#default_value' => $user->uid ? theme('username', $user, FALSE) : '',