Opened 15 months ago
Last modified 6 months ago
#9031 new enhancement
bp_has_groups has missing parameter to fetch groups based on the group's creator or admin
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Contributions | Priority: | normal |
Severity: | normal | Version: | 11.4.0 |
Component: | Groups | Keywords: | needs-patch needs-unit-tests |
Cc: |
Description
During our client assistance, we came across an issue wherein we were unable to list groups using the bp_has_groups function based on the group's creator or admin.
The function accepts several parameters to filter the groups, such as 'user_id', 'group_id', 'search_terms', etc. However, none of these parameters directly allow you to filter groups based on the group's creator or admin.
The user_id parameter determines the results you will see based on the groups you have joined..
https://buddypress.org/support/topic/filter-groups-by-admin-owner/
got a workaround by creating a list using SQL for the creator_id
and then sending the same as the argument using the included parameter
Using bp_has_groups() twice with different parameters inside a custom tab and the loop template can cause conflicts or unintended behavior.
Having a custom template for group-loop was necessary to achieve the desired result.