BP_Blogs_Blog::get_blogs_for_user() should be selecting the "blog_id" column
|Reported by:||r-a-y||Owned by:|
In bp-blogs.php, bp_blogs_get_blogs_for_user() uses BP_Blogs_Blog::get_blogs_for_user().
Currently, BP_Blogs_Blog::get_blogs_for_user() looks up the "id" column, when it should be looking up the "blog_id" column.
The attached patch fixes this and addresses #2055.
Also, you can bring back the get_blog_role_for_user() function and the related changes to bp-core-adminbar.php, which was removed in changeset . The fix now makes this reliable again. I also don't think this function is expensive, unless a user has a lot of blogs!
If you bring back get_blog_role_for_user(), you might want to re-open #1724.