From 35362272f16a35e4b64ff8be0b70c966ae7a0aba Mon Sep 17 00:00:00 2001 From: scribu Date: Thu, 28 Oct 2010 13:26:16 +0000 Subject: [PATCH] More precise role querying. Props johnbillion for initial patch. Fixes #12693 git-svn-id: https://develop.svn.wordpress.org/trunk@16048 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 7e35b9df8f..0e0ca9ed6d 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -460,7 +460,7 @@ class WP_User_Query extends WP_Object_Query { $cap_meta_query['key'] = $wpdb->get_blog_prefix( $blog_id ) . 'capabilities'; if ( $role ) { - $cap_meta_query['value'] = $role; + $cap_meta_query['value'] = '"' . $role . '"'; $cap_meta_query['compare'] = 'like'; }