﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
16556,Search exact role name,082net,,"I've added 'system-author' role and now on Admin &gt; Users page 'author' includes users in 'system-author' role.

When wordpress search users in author role, it applied 
{{{
"" meta_value LIKE '%author%' ""
}}}
and the result includes 'system-author' also.

This can be fixed with adding double quote("") to role name:
{{{
"" meta_value LIKE '%\""author\""%' ""
}}}

We can fix this issue
1. WP_User_Search::prepare_query() from /wp-admin/includes/user.php:689
{{{
			$this->query_where .= $wpdb->prepare("" AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s"", '%""' . $this->role . '""%');
}}}
2. count_users() from /wp-includes/user.php:459
{{{
			$select_count[] = ""COUNT(NULLIF(`meta_value` LIKE '%\"""" . like_escape($this_role) . ""\""%', FALSE))"";
}}}

",enhancement,closed,normal,,Administration,3.0.5,normal,duplicate,has-patch,
