Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#15816 closed defect (bug) (fixed)

Allow user_* fields in WP_User_Query orderby arg

Reported by: duck_ Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:


Currently you can use 'email', 'url', 'registered' (and a couple of others) as the orderby arg in WP_User_Query, but not the actual DB field names 'user_email', 'user_url', 'user_registered'.

Related: #15791

Attachments (2)

15816.diff (943 bytes) - added by duck_ 5 years ago.
15816.ID-nicename.diff (1.1 KB) - added by duck_ 5 years ago.

Download all attachments as: .zip

Change History (5)

@duck_5 years ago

comment:1 @duck_5 years ago

  • Keywords has-patch added

Not sure if (user_)nicename also should be added to WP_User_Query as well (has an INDEX IIRC).

comment:2 @nacin5 years ago

(In [16953]) Allow actual DB fields in WP_User_Query orderby. props duck, see #15816.

@duck_5 years ago

comment:3 @nacin5 years ago

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

(In [16956]) Add user_nicename, nicename, ID to WP_User_Query orderby. props duck_, fixes #15816.

Note: See TracTickets for help on using tickets.