• Resolved stefang88

    (@stefang88)


    I’m using a multisite network with a main site (Site A) and 4 soon to be 5 sites (B,C,D,E). I’ve set up Ultimate member on 2 sites for testing (Site A & B) and blocked access unless users are logged in. But when I sign into site A as a subscriber then try navigate to site B, it asks me to login again.

    Is this right or am I missing something?
    What I would ideally like to do is have them register/login from site A then be able to navigate to sites B,C,D,E with having to logged in again, is this possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @stefang88

    Is your test subscriber added to the subsite? You need a custom code to register a user to a subsite automatically via UM Register Form with the following code:

    add_action("um_registration_complete", "um_add_user_to_main_site", 99, 2);
    function um_add_user_to_main_site( $user_id, $args ){
    
        if( isset( $args['form_id'] ) && $args['form_id'] == 756 ){
    
             $blog_id = 1;
    
             um_fetch_user( $user_id );
    
             $role = um_user("role");
    
             add_user_to_blog( $blog_id, $user_id, $role );
    
        }
    }

    form_id – this should match your Register Form ID
    blog_id – this should be the blog ID of the subsite that you want to register the user.

    Regards,

    Thread Starter stefang88

    (@stefang88)

    Hi @champsupertramp

    The Test subscriber has registered to the main site.
    I’ve used the code provider and put it on the main site functions but the new registered user is still not syncing to the subsite.

    Just so we are on the right track. Would something like this help with when I sign/register into main site as a subscriber then try navigate to site B, will it allow subscribers to go to the subsite without logging in again?

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @stefang88

    Sorry for the late response. By default, users can log in to the main site and then access the subsite and still remains logged in.

    Could you please check if you have added the correct blog ID to the code I’ve provided above? You can check it in https://yoursite.com/wp-admin/network/sites.php and then hover on the “Edit” link in the sites table. It should show the ID in the browser status.

    Regards,

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @stefang88

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help… ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multisite Help!’ is closed to new replies.