I apologise if this sound super n00b of me but whenever I try to Google for this info all I get is "Get my plugin to do this or that" posts or people asking how to restrict or free cross site limitations... but nobody is actually answering the most basic of questions:
When a user signs up on a multisite, what sites do they actually have access to?
I want my users to sign up on my site (one of my subsites is the only place that offers a signup link) and then have access to all my subsites (more specifically, my main site). When they sign up I can see in my Users section that they are not assigned to ANY site at all... yet some of the users who navigate to my main site after signing up on my sub-site, when they encounter my custom plugin that checks whether or not the user is logged in before displaying them certain content, those users say "It worked, I got the content. Thanks". At the same time, other users contact me and say "I can't see anything. Where is the content?"
Everyone is registered and nobody is assigned access to any site and yet the user experience for different users differ. Huh !?
So now I am very confused... Does that mean that for every single user that registers on my site I must either manually go and give them access to each of my sites before they have access to anything or I must write/install a plugin that does that for me...? When they register, don't they have access to at least SOMETHING?
I am the super admin and I noticed that I have access to only one of the two sites (according to the users tab) but as the super admin I still have access to both sites (obviously). Now, how in the world I got access to one site listed under my name but not the other site, I do not know. I suspect it might be because I created the subsite after my account already existed (obviously)... but what about new users? They sign up and the Users page say they are now Subscribers with access to none of my sites... Huh!?
Again, my apologies if his sounds super n00b but this is jut confusing the daylights out of me.
- What is the point of a register link that gives you access to nothing after signup?
- And if you really have access to nothing then why do some users say my plugin works just fine while others say it doesn't when the first thing my plugin does is return if the user is not logged in?
- Finally, without having to rely on a third party plugin, what is the correct "WordPress only" way to let users sign up to sub-sites themselves after they have created an account on my network? Is there a wp_subscribe_without_reregistering() function or something I can call?
My apologies again for sounding like a complete n00b. I've had a multisite for years now but both my sites run independently of one another and one site has not had any reason for users to sign up on at all. Now that I am finally requiring cross site access between the third site I just created and the main site, now suddenly I have this issue with some users saying thanks while others are saying "where's the stuff" so it's only now that I am encountering this issue for the first time and all Google is good for is finding links to third party plugins. I can't seem to find the answer to what should be a rather simple question: What do you have access to after registration?
Thanks in advance for any clarification you can offer me
EDIT: Just to add... I ended up adding this to my custom plugin:
function my_join_blogs($user_id) {
$blogs_ids = get_sites();
foreach( $blog_ids as $b ){
if ( !is_user_member_of_blog( $user_id, $b->blog_id ) )
add_user_to_blog( $b->blog_id, $user_id, 'subscriber' );
}
}
add_action('wpmu_activate_user','my_join_blogs',10,1);
So I don't need links to 3rd party plugins to get users signed up to my subsites. I am just curious about the questions I posed above. Thanks