Opened 15 years ago
Closed 12 years ago
#18183 closed enhancement (duplicate)
Better WP_User_Query search
| Reported by: | gluten | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Users | Version: | 3.2.1 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
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)
#6
follow-up:
↓ 7
@
12 years ago
- Resolution duplicate
- Status closed → 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
@
12 years ago
- Resolution → duplicate
- Status reopened → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Add display_name to WP_User_Query search columns