WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#16620 closed enhancement (duplicate)

WP_User_Query, one more column solves many problems

Reported by: jasonnathan Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Users Keywords:
Focuses: Cc:

Description

It is currently not very easy to search a user by his first or last name but if one more column (in fact, just one more word) was added to the User Query object, we could instruct our users to set their display name to something that represents their names and they become searchable!

change line 490 from :

	else
		$search_columns = array('user_login', 'user_nicename');

to

	else
		$search_columns = array('user_login', 'user_nicename', 'display_name');

Now the display name yields results from search

Attachments (1)

user.php (49.0 KB) - added by jasonnathan 4 years ago.
wp-includes/user.php

Download all attachments as: .zip

Change History (3)

@jasonnathan4 years ago

wp-includes/user.php

comment:1 @greuben4 years ago

  • Keywords has-patch removed
  • Resolution set to duplicate
  • Status changed from new to closed

Dupe of #16366

comment:2 @scribu4 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.