Update for the access field for contacts.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 2 May 2018 13:28:48 +0000 (09:28 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 2 May 2018 13:28:48 +0000 (09:28 -0400)
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
models/admin/ajax/billingFlagExpiredUsers.php

index 83ed6e4..5c4c642 100644 (file)
@@ -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
index d31eab1..9bfb69d 100644 (file)
@@ -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