WPMU – new users are automatically subscribed to the main blog – how to prevent that?

New users added via wpmu_signup_blog($domain, $path, $title, $user_name, $user_email); are automatically subscribed to the main blog. Can this be prevented? I only want them to be administrators of their newly created blog.

I have no idea where to start looking for that as it seems to be some internal WordPress’s mechanism that handles that.

http://codex.wordpress.org/WPMU_Functions/wpmu_signup_blog

1 Answer
1

This is a known bug.

A fix will be available in 3.6.1, see:
http://core.trac.wordpress.org/ticket/25166

For now, either bulk remove the users in WP Admin or do something (ugly and temporary, remove when 3.6.1 is available) like:

add_action( 'wpmu_new_user', function ( $user_id ) {
    global $current_site;
    remove_user_from_blog( $user_id, $current_site->blog_id ); // remove user from main blog.
 } );

Leave a Comment