• Resolved countcrookula

    (@countcrookula)


    Can anyone help me. I am trying to find out how to edit the content of the email that is sent out to new registrants on my site. I have password protected a page with a simple password and want to add that password after the standard username and password generated by wordpress. I don’t need to generate random passes for each new registrant just the one pass for all.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    It’s in /wp-includes/pluggables.php in the function called wp_new_user_notification() on line 614. You’ll probably just want to change $plaintext_pass with whatever your password is in the line $message .= sprintf(__(‘Password: %s’), $plaintext_pass) . “\r\n”; on line 630.

    From what your saying, it doesn’t sound like you want to change the password that wp generates a user. If you do, read above, otherwise, read this:

    The person above me is right, that’s where the function you’re looking for is. But instead of changing the value of $plaintext_pass, I’m guessing you’re more looking to alter the email that is sent out to them, then below the lines:

    $message  = sprintf(__('Username: %s'), $user_login) . "\r\n";
    	$message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
    	$message .= get_option('siteurl') . "/wp-login.php\r\n";

    Add:
    $message .= __('Whatever your message is goes in here') . '\r\n';

    Just to let you know that I have a plugin that performs this function(defining the registration email), which saves editing a core file(which should be avoided), you can find it here:
    New User Email Setup

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding text to the email sent when registering’ is closed to new replies.