Match the exact role name when counting users in a role. Props 082net. fixes #12693

git-svn-id: http://svn.automattic.com/wordpress/trunk@19735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2012-01-20 16:34:26 +00:00
parent fab149d81e
commit d23f8fcb48
1 changed files with 1 additions and 1 deletions

View File

@ -854,7 +854,7 @@ function count_users($strategy = 'time') {
// Build a CPU-intensive query that will return concise information.
$select_count = array();
foreach ( $avail_roles as $this_role => $name ) {
$select_count[] = "COUNT(NULLIF(`meta_value` LIKE '%" . like_escape($this_role) . "%', false))";
$select_count[] = "COUNT(NULLIF(`meta_value` LIKE '%\"" . like_escape( $this_role ) . "\"%', false))";
}
$select_count = implode(', ', $select_count);