[buddypress-trac] [BuddyPress Trac] #6734: `groups_get_groups()` doesn't distinguish between `0` and falsey values for `user_id`
buddypress-trac
noreply at wordpress.org
Fri Sep 9 21:30:36 UTC 2016
#6734: `groups_get_groups()` doesn't distinguish between `0` and falsey values for
`user_id`
-------------------------------------------------+-------------------------
Reporter: boonebgorges | Owner:
Type: defect (bug) | boonebgorges
Priority: normal | Status: closed
Component: Groups | Milestone:
Severity: normal | Version:
Keywords: 2nd-opinion needs-patch needs-unit- | Resolution: wontfix
tests |
-------------------------------------------------+-------------------------
Changes (by boonebgorges):
* status: assigned => closed
* resolution: => wontfix
* milestone: 2.7 =>
Comment:
I started writing a patch and realized that this won't work. The default
value of 'user_id' set in `bp_has_groups()` is `bp_displayed_user_id()`.
When there's no displayed user, `bp_displayed_user_id()` returns `0`. In
this case, the expectation is that all groups will display. There are
almost certainly people with similar expectations, so I don't think we can
make the change.
The workaround is to pass `array( 0 )` to `user_id`.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6734#comment:11>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list