From fd0a885e29bd2d3b7fd2853e8c1ce7617cdcb0e4 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 2 May 2018 09:28:48 -0400 Subject: [PATCH] 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. --- classes/billingSupport.php | 3 ++- models/admin/ajax/billingFlagExpiredUsers.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.17.1