Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3696 closed defect (bug) (duplicate)

User added to root blog when creating a new blog

Reported by: gdott9 Owned by:
Priority: normal Milestone:
Component: Blogs Version: 1.5
Severity: normal Keywords: has-patch
Cc:

Description

Hi,

When a user creates a new blog on a WPMU plateform, it adds the root blog and the new blog to his list of blogs. The root blog should not be added.

It's because of this part in the function bp_blogs_add_user_to_blog in bp-blogs/bp-blogs-functions.php :

       if ( empty( $blog_id ) && isset( $wpdb->blogid ) )
               $blog_id = $wpdb->blogid;
       else
               $blog_id = bp_get_root_blog_id();

It overrides the value of the $blog_id parameter in every case whereas it should only do it if $blog_id is empty.

I attached a patch to this ticket.

Attachments (1)

3696.patch (834 bytes ) - added by gdott9 15 years ago.

Download all attachments as: .zip

Change History (3)

@gdott9
15 years ago

#1 @boonebgorges
15 years ago

  • Resolutionduplicate
  • Status newclosed

Whoops, looks like #3755 was a duplicate of this ticket, and I fixed it (with essentially the same code as you've provided, though a bit more compacted) in r5338.

#2 @johnjamesjacoby
15 years ago

  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.