From d23f8fcb48fd9084aad1e10b001254cf094d9d18 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 20 Jan 2012 16:34:26 +0000 Subject: [PATCH] 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 --- wp-includes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 8d0de2f68..7bb10277f 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -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);