From: Laury GvR Date: Thu, 2 Aug 2018 19:27:24 +0000 (-0400) Subject: Fix incorrect table prefix being referenced for usermeta table queries X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=327875221208bef5fd4023b4f58846503b86e982;p=WP-Plugins%2Fglm-member-db-contacts.git Fix incorrect table prefix being referenced for usermeta table queries --- diff --git a/classes/data/dataContacts.php b/classes/data/dataContacts.php index c7e8a5e..f856fd8 100644 --- a/classes/data/dataContacts.php +++ b/classes/data/dataContacts.php @@ -854,7 +854,7 @@ class GlmDataContacts extends GlmDataAbstract if ( $contact_id = filter_var( $contact_id, FILTER_VALIDATE_INT ) ) { return $this->wpdb->get_var( "SELECT user_id - FROM glm_usermeta + FROM " . $this->wpdb->prefix . "usermeta WHERE meta_key = 'glmMembersContactID' AND meta_value = '$contact_id'" ); diff --git a/models/admin/contacts/index.php b/models/admin/contacts/index.php index fa7419c..9ffb3ba 100644 --- a/models/admin/contacts/index.php +++ b/models/admin/contacts/index.php @@ -643,7 +643,7 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts // We need to check if they manage multiple members $other_members_refs = $this->wpdb->get_var( "SELECT meta_value - FROM glm_usermeta + FROM " . $this->wpdb->prefix . "usermeta WHERE meta_key = 'glmMembersContactMembers' AND user_id = " . $this->config['loggedInUser']['wpUser']['ID'] ); diff --git a/setup/adminTabs.php b/setup/adminTabs.php index 6258711..52a0947 100644 --- a/setup/adminTabs.php +++ b/setup/adminTabs.php @@ -56,7 +56,7 @@ if (current_user_can('glm_members_member')) { // We need to check if they manage multiple members $other_members_refs = $this->wpdb->get_var( "SELECT meta_value - FROM glm_usermeta + FROM " . $this->wpdb->prefix . "usermeta WHERE meta_key = 'glmMembersContactMembers' AND user_id = " . $this->config['loggedInUser']['wpUser']['ID'] );