Make WordPress Core

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's profile 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)

37641.diff (4.8 KB) - added by flixos90 8 years ago.

Download all attachments as: .zip

Change History (4)

@flixos90
8 years ago

#1 @flixos90
8 years ago

  • Keywords has-patch has-unit-tests added; needs-patch removed

37641.diff adds support for these fields to WP_User_Query. Unit tests are also included.

#2 follow-up: @thomaswm
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 @flixos90
8 years ago

Replying to thomaswm:

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.

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.

Note: See TracTickets for help on using tickets.