Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated sign-up email should include all necessary information for accessing the system. #46

Closed
hamishwillee opened this issue Feb 11, 2015 · 1 comment
Assignees

Comments

@hamishwillee
Copy link
Contributor

Problem is that people keep ignoring the fact there is a 2 level login. Solution is to add this information to email that sends out WP details.

@hamishwillee
Copy link
Contributor Author

In /wp-includes/pluggable.php, changed:

   function wp_new_user_notification($user_id, $plaintext_pass = '') {
    $user = get_userdata( $user_id );

    // The blogname option is escaped with esc_html on the way into the database in sanitize_option
    // we want to reverse this for the plain text arena of emails.
    $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);

    $message  = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
    $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
    $message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n";

    @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);

    if ( empty($plaintext_pass) )
            return;

    $message  = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
    $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
    $message .= wp_login_url() . "\r\n";

    wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);

}
endif;

To:

    $message  = "Thank you for your interest in becoming a wiki editor! \r\n\r\n";
    $message .= "To access the site:\r\n";
    $message .= "- Open:" .wp_login_url() . "\r\n";
    $message .= "- Enter the (case sensitive) first level authentication details: \r\n";
    $message .= "   Username: ArduPilot \r\n";
    $message .= "   Password: 3DRobotics \r\n";
    $message .= "- Enter your WordPress credentials: \r\n";
    $message .= sprintf(__('   Username: %s'), $user->user_login) . "\r\n";
    $message .= sprintf(__('   Password: %s'), $plaintext_pass) . "\r\n";
    $message .= "\r\n";
    $message .= "Once you have logged-in, you can access your *authorised* sites from the top-left menu 'My Sites'. \r\n";
    $message .= "\r\n";
    $message .= "Notes:\r\n";
    $message .= ' - The Wiki Editing Guide (planner.ardupilot.com/wiki/common-editor-information-resource/) explains how to create and edit topics.';
    $message .= "\r\n";
    $message .= " - Special care needs to be taken when working with 'common' topics.\r\n";
    $message .= " - We will send you an invitation to the Wiki Editors Discussion Google-group shortly. It is a great place to ask questions and get feedback on your edits. \r\n";
    $message .= "\r\n";
    $message .= "Thanks again. If you have any questions or issues, please contact hamish@3drobotics.com. \r\n";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant