Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#29084 closed enhancement (fixed)

Add filter to modify user queries before building query

Reported by: rmccue Owned by: rmccue
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.1
Component: Users Keywords: has-patch
Focuses: Cc:


We have pre_user_query, but that runs after all of the SQL has been built. We need a corresponding filter for before the SQL has built. I propose pre_get_users to match pre_get_posts.

Attachments (2)

29084.diff (322 bytes) - added by rmccue 7 years ago.
Add pre_user_query function
29084.2.diff (630 bytes) - added by rmccue 7 years ago.
scott's picky

Download all attachments as: .zip

Change History (5)

7 years ago

Add pre_user_query function

#1 @rmccue
7 years ago

  • Keywords has-patch added
  • Owner set to rmccue
  • Status changed from new to assigned
  • Type changed from defect (bug) to enhancement
  • Version set to 3.1

Go go go?

7 years ago

scott's picky

#2 @wonderboymusic
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 29363:

Add an action, pre_get_users, in WP_User_Query::prepare_query().

Props rmccue.
Fixes #29084.

#3 @wonderboymusic
7 years ago

  • Milestone changed from Awaiting Review to 4.0
Note: See TracTickets for help on using tickets.