Opened 3 years ago
Closed 3 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: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.5 |
| Component: | Blogs | Version: | |
| Severity: | 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.
Attachments (1)
Change History (2)
comment:1
johnjamesjacoby — 3 years ago
- Resolution set to fixed
- Status changed from new to closed

(In [3025]) Fixes #2431 props r-a-y