Support

Account

Home Forums ACF PRO Letting users choose their own password on registration Reply To: Letting users choose their own password on registration

  • Hi @futaba

    Unfortunately, the method you were using (pointing to wp-login.php?action=register) won’t allow you to have a password field. As a workaround, you can add a password field manually like this:

    <input type="password" name="user_password" value="" placeholder="Password" id="user_password" class="input" />

    And then use the user_register action and wp_set_password() function to change the password like this:

    add_action( 'user_register', 'myplugin_registration_change_pass', 10, 99 );
    
    function myplugin_registration_change_pass( $user_id ) {
    
        if ( isset( $_POST['user_password'] ) )
            wp_set_password( $_POST['user_password'], $user_id );
    
    }

    Like I said before, this topic is more related to WordPress. For further support, kindly visit WordPress community instead.

    I hope this helps 🙂