Opened 13 years ago
Closed 11 years ago
#18183 closed enhancement (duplicate)
Better WP_User_Query search
Reported by: | gluten | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.2.1 |
Component: | Users | Keywords: | has-patch |
Focuses: | Cc: |
Description
The get_users() function only searches 'user_login' and 'user_nicename' (when searching for a user by name). There is no way to search users by their display name. Including 'display_name' would make searching with get_users() much more intuitive, since in my experience users tend to be known by their display name and not necessarily their login. In theory I could do a meta_query for fields such as first and last name, but I can't find an easy way to query 'display_name' since it is not on the 'usermeta' table.
Attachments (1)
Change History (8)
#5
@
13 years ago
- Keywords commit removed
- Milestone 3.3 deleted
- Resolution set to duplicate
- Status changed from new to closed
#6
follow-up:
↓ 7
@
11 years ago
- Resolution duplicate deleted
- Status changed from closed to reopened
I'm puzzled.
This is a necessary feature, and "it doesn't scale" isn't a valid excuse.
Either add the relevant index or... just leave it open. Doesn't make sense to close it.
#7
in reply to:
↑ 6
@
11 years ago
- Resolution set to duplicate
- Status changed from reopened to closed
Replying to Lohoris:
Either add the relevant index or... just leave it open. Doesn't make sense to close it.
There's no point in leaving a ticket open that will never get fixed.
That said, this ticket is three years old. See #27304 for a newer approach which will have some dependencies on other changes to Multisite behaviour once I get around to documenting them.
Add display_name to WP_User_Query search columns