Opened 8 years ago
Last modified 5 years ago
#37641 new enhancement
Support queries on `spam` and `deleted` fields in `WP_User_Query` on multisite
Reported by: | flixos90 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Users | Keywords: | has-patch has-unit-tests |
Focuses: | multisite | Cc: |
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
@
8 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
@
8 years ago
Replying to thomaswm:
It has been suggested in #34316 to remove the
spam
anddeleted
fields 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.
37641.diff adds support for these fields to
WP_User_Query
. Unit tests are also included.