#5778 closed enhancement (wontfix)
Post Form, user without groups
Reported by: | SGr33n | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Templates | Keywords: | has-patch |
Cc: |
Description
Hi :)
On BuddyPress if the user have no groups, the post update form will show a select field with just one option. This will show the select field only if the user has groups. Just added bp_get_total_group_count_for_user() > 0 to the conditions.
Attachments (2)
Change History (11)
#1
@
10 years ago
- Summary changed from Post Form, user without without groups to Post Form, user without groups
#3
@
10 years ago
- Component changed from Core to Theme
- Milestone changed from Awaiting Review to Future Release
- Type changed from defect (bug) to enhancement
#4
@
10 years ago
You're right, I didn't see the function source... anyway I can see that it uses
class BP_Groups_Member
that has a
refresh_total_group_count_for_user
Now, do you know if when a user joins a group this refresh is called? In this case I suppose that the cache should always be in sync... on the opposite case do you think that count total groups on every page where there is a whats-new form could be too heavy?
#6
@
9 years ago
- Keywords has-patch added; needs-patch removed
I do not see a problem with using a cached count function here.
We use bp_get_total_group_count_for_user( bp_loggedin_user_id() )
on the groups directory for the "My Groups
" tab and that is almost the same use case here.
I think a decent idea but the function you added ends up calling a (cached) DB query, which isn't ideal. Have you looked through the
buddypres()
global at this point of execution, and see if there are any existing properties set which we could use to do the same thing?