Use wpdb->prefix instead of wpdb->base_prefix(). base_prefix() does not return the correct prefix when a blog ID is not passed.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7095a9b0d3
commit
311b5a82cc
|
@ -688,7 +688,7 @@ class WP_User_Search {
|
|||
$this->query_from .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id";
|
||||
$this->query_where .= $wpdb->prepare(" AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%');
|
||||
} elseif ( is_multisite() ) {
|
||||
$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
|
||||
$level_key = $wpdb->prefix . 'capabilities'; // wpmu site admins don't have user_levels
|
||||
$this->query_from .= ", $wpdb->usermeta";
|
||||
$this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue