Skip to:
Content

BuddyPress.org

Ticket #5367: 5367-add-to-blog.diff

File 5367-add-to-blog.diff, 927 bytes (added by imath, 11 years ago)
  • bp-members/bp-members-functions.php

     
    12681268
    12691269        // Multisite installs have their own install procedure
    12701270        if ( is_multisite() ) {
     1271
     1272                // In case BuddyPress is not activated on the network, managing members of the community
     1273                // is only possible in the BuddyPress root blog administration, so we need to be sure
     1274                // the signup will be a member of this root blog.
     1275                if( ! bp_is_network_activated() && empty( $usermeta['add_to_blog'] ) ) {
     1276                        $usermeta['add_to_blog'] = bp_get_root_blog_id();
     1277                        $usermeta['new_role']    = bp_get_option( 'default_role', 'subscriber' );
     1278                }
     1279
    12711280                wpmu_signup_user( $user_login, $user_email, $usermeta );
    12721281
    12731282                // On multisite, the user id is not created until the user activates the account