Skip to:
Content
Pages
Categories
Search
Top
Bottom

Use full name in confirmation emails

  • @peterverkooijen

    Participant

    How can I use the full name/real name in the activation email and messages?

    It shouldn’t be necessary to have emails with ‘Dear User’ when you already have the new member’s real name.

Viewing 3 replies - 1 through 3 (of 3 total)
  • @djpaul

    Keymaster

    You can’t. The username is passed by WPMU to all the relevant functions. You would have to hack several default files.

    @peterverkooijen

    Participant

    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.]

    @peterverkooijen

    Participant

    This works!:

    $welcome_email = str_replace("DISPLAYNAME", $meta[field_1], $welcome_email );

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use full name in confirmation emails’ is closed to new replies.
Skip to toolbar