Opened 10 years ago
Last modified 7 years ago
#37641 new enhancement
Support queries on `spam` and `deleted` fields in `WP_User_Query` on multisite
| Reported by: | flixos90 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Users | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | multisite |
Description
The users database table on multisite contains two additional fields spam and deleted which need to be queried in some cases. For example the function wp_update_network_user_counts() makes a direct SQL query at the moment, but that could be improved if WP_User_Query supported these fields (only on multisite that is).
Attachments (1)
Change History (4)
#2
follow-up:
↓ 3
@
10 years ago
It has been suggested in #34316 to remove the spam and deleted fields from the users database table and introduce a user status API instead.
#3
in reply to: ↑ 2
@
10 years ago
Replying to thomaswm:
It has been suggested in #34316 to remove the
spamanddeletedfields from the users database table and introduce a user status API instead.
Okay, makes sense. Let's leave this ticket open, but hold off until we decide which direction #34316 is gonna take. While the changes here would be helpful enhancements for the current state, they probably shouldn't be added if we're gonna change the functionality altogether.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
37641.diff adds support for these fields to
WP_User_Query. Unit tests are also included.