From: Steve Sutton Date: Wed, 2 May 2018 13:28:48 +0000 (-0400) Subject: Update for the access field for contacts. X-Git-Tag: v1.0.0^2~21 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=fd0a885e29bd2d3b7fd2853e8c1ce7617cdcb0e4;p=WP-Plugins%2Fglm-member-db-billing.git Update for the access field for contacts. When expired flag the access level to 35 so they are not displayed and moderated. Then when they renewal they goto 40 display not moderated. --- diff --git a/classes/billingSupport.php b/classes/billingSupport.php index 83ed6e4..5c4c642 100644 --- a/classes/billingSupport.php +++ b/classes/billingSupport.php @@ -1409,7 +1409,8 @@ class GlmBillingSupport $this->wpdb->query( $this->wpdb->prepare( "UPDATE " . GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts - SET contact_role = " . $activeRole . " + SET contact_role = " . $activeRole . ", + access = 40 WHERE ref_dest = ( SELECT ref_dest FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "accounts diff --git a/models/admin/ajax/billingFlagExpiredUsers.php b/models/admin/ajax/billingFlagExpiredUsers.php index d31eab1..9bfb69d 100644 --- a/models/admin/ajax/billingFlagExpiredUsers.php +++ b/models/admin/ajax/billingFlagExpiredUsers.php @@ -100,7 +100,8 @@ class GlmMembersAdmin_ajax_billingFlagExpiredUsers } $this->wpdb->query( "UPDATE " . GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX. "contacts - SET contact_role = " . $restrictedRole . " + SET contact_role = " . $restrictedRole . ", + access = 35 WHERE ref_dest IN ( SELECT ref_dest FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "accounts