[wp-trac] [WordPress Trac] #16014: Search wildcards should only affect multisite
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 29 20:17:57 UTC 2010
#16014: Search wildcards should only affect multisite
--------------------------+------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: Users | Version:
Severity: normal | Resolution:
Keywords: regression |
--------------------------+------------------
Comment (by SergeyBiryukov):
Took me too long to figure out. The patch seems to be working.
Searching for `admin` on a single site:
{{{
WHERE 1=1 AND (user_login LIKE '%admin%' OR user_nicename LIKE '%admin%')
}}}
On Multisite:
{{{
WHERE 1=1 AND (user_login LIKE 'admin' OR user_nicename LIKE 'admin')
}}}
However, searching for `admin*` on a single site results in “No matching
users were found”:
{{{
WHERE 1=1 AND (user_login LIKE '%admin%' OR user_nicename LIKE '%admin*%')
}}}
On Multisite, it's OK:
{{{
WHERE 1=1 AND (user_login LIKE 'admin' OR user_nicename LIKE 'admin%')
}}}
Is this correct? Perhaps `$search = trim($search, '*')` is needed for a
single site too?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16014#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list