You can’t. The username is passed by WPMU to all the relevant functions. You would have to hack several default files.
I know. My question is which files to hack and how, specifically how to get the member’s name from the form or database. Or how to get the full name of the logged-in member from the database in general for other situations.
I’ve already tried editing the email text in wpmu-functions.php, replaced ‘User’ with ‘DISPLAYNAME’ and added this line:
‘$welcome_email = str_replace(\”DISPLAYNAME\”, $user->display_name, $welcome_email ); ‘
That kinda works, but the display_name in my new installation is the same as the username, not the full name. Not sure if that’s how it’s supposed to be. The full name is stored elsewhere, with two tables involved. I have no clue how to retrieve that data.
Or if anyone can tell me how to get the full name in the display_name field, that would fix the problem as well.
The default emails are really unacceptable. I\’m trying to move to Buddypress from a home-baked system where this kind of thing was easy. Can anyone give any pointers on how to retrieve basic logged-in member data with custom php/mysql?
Thanks!
[BTW, this comment system is going crazy with the escapes. You probably already knew.]
This works!:
$welcome_email = str_replace("DISPLAYNAME", $meta[field_1], $welcome_email );