Opened 15 years ago
Closed 15 years ago
#2431 closed defect (bug) (fixed)
BP_Blogs_Blog::get_blogs_for_user() should be selecting the "blog_id" column
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 1.2.5 | Priority: | major |
Severity: | Version: | ||
Component: | Blogs | Keywords: | has-patch |
Cc: |
Description
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 [2394]. 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.
(In [3025]) Fixes #2431 props r-a-y