Users with multiple WP MU sites

I have read the current known issues for the WHMCS MU Provisioning plugin. The two that I am trying to find a work around for are:

3. WHMCS generates random passwords when creating a service. If a new WordPress user is
created as a result this random password is the password for the new user. If the user already exists
in WordPress WHMCS still generates a random password but it does NOT change the WordPress password.
WHMCS can change the password on WordPress but WordPress password changes will not be feed back to WHMCS.

4. Each WHMCS service creates different random passwords so they will not match if a Client has more than one
service at the same WordPress site.

Knowing that I will likely have users with multiple sites this is going to be a problem for me. I understand that Wordpress stores the passwords hashed so I would not be able to send the same password but what I would like to do is modify the plugin so if it sees that the user was already existing in the MU site then rather than generate another password it puts some text in the email that says something like 'please use your existing WP password, if you have lost your WP password please click this link to reset your password'.

I think that WP is sending the email out to the user with the username and password on it but I am wondering if that is in case correct and if so which file is the plugin is responsible for sending the email out.

Thanks!
Brian

  • aristath

    Hello there @bseibenick, I hope you're well today!

    I think that WP is sending the email out to the user with the username and password on it but I am wondering if that is in case correct and if so which file is the plugin is responsible for sending the email out.

    That is correct, the user is sent their username/password via email.
    I'm afraid that this however is a bit above my level of expertise, so I have notified our Second Level Support on this thread, they should be here shortly to provide some further assistance.
    Please keep in mind though that SLS deal with all the complex coding threads in these forums so this could take a bit longer than a normal ticket.

    Cheers,
    Ari.

  • Ash

    Hello @bseibenick

    I hope you are well today.

    You got the right function. This is a built in wordpress function. You can see the function in /wp-includes/ms-functions.php line no 1419.

    There are several filters you can use:

    wpmu_welcome_notification // disable this email
    update_welcome_email // Change the email content
    update_welcome_subject // Change email subject

    You can use these filters to change to fit your needs. For example, if you need to change the content:

    add_filter( 'update_welcome_email', 'update_welcome_email_cb', 99, 6 );
    function update_welcome_email_cb( $welcome_email, $blog_id, $user_id, $password, $title, $meta ) {
        return "Your updated content";
    }

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.