Skip to:
Content
Pages
Categories
Search
Top
Bottom

No welcome email in BP 1.1.3?


  • peterverkooijen
    Participant

    @peterverkooijen

    Is there no welcome email in version 1.1.3?

    In the current 1.0 based version of my site new members get an activation link and then a second Welcome email with their password.

    In 1.1.3 the default seems to be that new members provide their own password upon registration, which is OK, and there is only the activation email.

    I’d still like to send a welcome email with the password and other useful information. WPMU has a Welcome User Email under Site Options. How can I turn that one back on?

    I’m aware of DJ Paul’s Welcome Pack plugin, but I don’t need the other functionality in that plugin and would rather use core functionality if available.

Viewing 3 replies - 1 through 3 (of 3 total)

  • peterverkooijen
    Participant

    @peterverkooijen

    Does anyone know how to get a welcome email in BP 1.1.3 without resorting to the Welcome Pack plugin?

    There are some clues here, but I have no idea what to do with them and if this would even apply to Buddypress registration process.

    Should I just stick this in a template files somewhere? Where?

    <?php wpmu_welcome_user_notification($user_id, $password, $meta); ?>

    Would it take the text from the Options in the admin area?

    Or does BP have its own function for this?


    peterverkooijen
    Participant

    @peterverkooijen

    Found this in bp_core_activation.php:

    /***
    * bp_core_disable_welcome_email()
    *
    * Since the user now chooses their password, sending it over clear-text to an
    * email address is no longer necessary. It's also a terrible idea security wise.
    *
    * This will only disable the email if a custom registration template is being used.
    */
    function bp_core_disable_welcome_email() {
    if ( '' == locate_template( array( 'registration/register.php' ), false ) && '' == locate_template( array( 'register.php' ), false ) )
    return true;

    return false;
    }
    add_filter( 'wpmu_welcome_user_notification', 'bp_core_disable_welcome_email' );

    So I guess I could just remove this function?

    Is sending that password really such a “terrible idea security wise”? Are criminal gangs intercepting these emails to break into WordPress accounts?

    EDIT: Yes, removing that function works. A regular WPMU welcome email is sent.

    But the password in the email is eight numbers instead of the eight letters password I’d entered. Why?! Does Buddypress do its own encryption on the password? Does it use other tags or “placeholders” or whatever they’re called to call the password?

    Going to sit in a corner and cry…


    peterverkooijen
    Participant

    @peterverkooijen

    The welcome email is generated by this function in wpmu-functions.php:

    function wpmu_welcome_user_notification($user_id, $password, $meta = '') {
    global $current_site;

    if( !apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta) )
    return false;

    $welcome_email = get_site_option( 'welcome_user_email' );

    $user = new WP_User($user_id);

    $fullname = $meta[field_1];

    $welcome_email = apply_filters( "update_welcome_user_email", $welcome_email, $user_id, $password, $meta);
    $welcome_email = str_replace( "FULLNAME", $fullname, $welcome_email );
    $welcome_email = str_replace( "SITE_NAME", $current_site->site_name, $welcome_email );
    $welcome_email = str_replace( "USERNAME", $user->user_login, $welcome_email );
    $welcome_email = str_replace( "PASSWORD", $password, $welcome_email );
    $welcome_email = str_replace( "LOGINLINK", wp_login_url(), $welcome_email );
    ...

    I’ve added the FULLNAME lines. It works if used in the welcome email text in the wp-admin options.

    But haven’t figured out how to get the right password…

    Is there a way to put this customized function in bp-custom.php? And let the system use that one instead of the original in wpmu-functions.php? Forgot how that worked.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No welcome email in BP 1.1.3?’ is closed to new replies.
Skip to toolbar