Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#3696 closed defect (bug) (duplicate)

User added to root blog when creating a new blog

Reported by: gdott9 Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5
Component: Blogs 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 10 years ago.

Download all attachments as: .zip

Change History (3)

@gdott9
10 years ago

#1 @boonebgorges
9 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

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
9 years ago

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