From 2aa4b228e314100a3e34e77fbcfe84808b4d7381 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@19735 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 8d0de2f68c..7bb10277f8 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);