Opened 11 years ago
Closed 9 years ago
#25697 closed defect (bug) (invalid)
User search in network admin returns different results to user search in a sub-site
Reported by: | tomdxw | Owned by: | johnbillion |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Users | Keywords: | |
Focuses: | administration, multisite | Cc: |
Description (last modified by )
I just created a new user called "abc123
" with an email address of "camel@example.com
" on the main site of a multisite installation.
I performed the following searches in both /wp-admin/users.php and /wp-admin/network/users.php:
- "
camel@example.com
" finds the user in both cases - "
@example.com
" finds the user only on the non-network search - "
camel@
" finds the user only on the non-network search - "
example.com
" does not find the user - "
camel
" does not find the user
It would be helpful to be able to search for @example.com
in the network admin for instance when we receive bounce emails which don't specify the full email address.
Change History (8)
This ticket was mentioned in Slack in #core-multisite by sergey. View the logs.
9 years ago
Note: See
TracTickets for help on using
tickets.
This behavior was set in place by [17189] via #16014, in which a specific decision was made to wrap single site searches with a leading and trailing
*
for wildcard searching while leaving it to the searcher to add a wildcard in multisite.Searching with an explicit wildcard as
*@example.com
andcamel@*
should work as intended unlesswp_is_large_network( 'users' )
is true. If so, then leading wildcards will be stripped and onlycamel@*
should work as intended.For the
example.com
andcamel
searches, if the@
character is not found in a search term,WP_User_Query
does not includeuser_email
in the search and looks inuser_login
anduser_nicename
instead. This behavior can be filtered withuser_search_columns
, introduced in [24056].IMO, the way wildcards are treated between single and multisite makes sense. See #20661 for a request to better document this in the admin help.
The search behavior around
@
is somewhat confusing and could be interesting to take another look at.Related: #15170, #16366, #20135