Opened 9 years ago
Closed 9 years ago
#6496 closed defect (bug) (no action required)
BP_User_Query may return wrong total if WP_User query was filtered
Reported by: | tanner m | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Members | Keywords: | has-patch needs-unit-tests needs-testing |
Cc: |
Description
I am working on a site that is using the bp-profile-visibility plugin which filters the WP_User_Query to hide profiles. Since the BP_User_Query class does not sync with the WP_User_Query totals if it already has a total, the actual total count from the WP_User_Query query can very from the initial count from BP_User_Query.
I am attaching a patch that will update the BP_User_Query total with the actual results count from the WP_User_Query.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Thanks for the patch, tanner. This needs cross-referencing against [7660], to make sure we don't reintroduce #5271. If there's a way to write unit tests that demonstrate this fix and that one, it'd make it easier :)