#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)
Change History (3)
Note: See
TracTickets for help on using
tickets.
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.