Only activate Set Password on blog signup

Hi,

As new subscribers of blogs are approved/moderated by site admin with New User Approve, they may not remember the password they set up on signup if the site admin approve them few days later...

Is it possible to activate Set Password for blog signup only?

Best regards,
Frank

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Frank

    Hope you are doing good today :slight_smile:

    What form you are using for users registration and what form for blog registration. Can you please post the link of both pages.

    You can use custom registration for user registration and remove the hooks that allows set password plugin to add form. Here is a good writeup to use your own registration forms.
    https://pippinsplugins.com/creating-custom-front-end-registration-and-login-forms/

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Frank
    • Site Builder, Child of Zeus

    Hey Sajid,

    The form for user registration comes from Join My Multisite plugin, in wp-content/plugins/join-my-multisite/lib/signuppage.php.

    How could i disable Set Password in this form? Would you have a code example?

    Best regards,
    Frank

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Frank

    Hope you are doing good today :slight_smile:

    To hide set password from all other forms except wp-signup.php you can use the following tiny plugin. Download the attached zip file, extract it and move to wp-content/mu-plugins folder (create if not exists).

    Hope it helps :slight_smile:

    Cheers, Sajid

  • Frank
    • Site Builder, Child of Zeus

    Hey @Sajid,

    Thanks for the file, it really helps me!

    Join My Multisite plugin uses its own sign-up page (join-my-multisite/lib/signuppage.php), and I couldn't use your mu-plugin as it is because $pagenow = index.php on user registration pages.

    Because user registration page will be named "Inscription" on every blog, I modify your plugin like below:

    function wpmu_remove_pass_fields(){
    	//global $pagenow;
    	if($_SERVER['REQUEST_URI'] == '/inscription/') {.....

    And that did the trick :slight_smile:

    Thanks again!

    Cheers,
    Frank

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.