Fix for switching expired user to not display on front end.
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 16 Nov 2018 16:34:51 +0000 (11:34 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 16 Nov 2018 16:34:51 +0000 (11:34 -0500)
When setting the flag for not display and contact_role need to remove
the where part to match only those that don't have restricted
contact_role a contact may have that set to restricted but not have the
access flag set correctly.

index.php
models/admin/ajax/billingFlagExpiredUsers.php

index ca1737d..6fabc96 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Billing
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: This is glmAssociate Billing Module
- * Version: 1.0.13
+ * Version: 1.0.14
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersBillingAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.0.13
+ * @version 1.0.14
  */
 
 /*
@@ -37,7 +37,7 @@
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.13');
+define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.14');
 define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.26');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index 0f0e5c9..e63f9fb 100644 (file)
@@ -118,9 +118,7 @@ class GlmMembersAdmin_ajax_billingFlagExpiredUsers
                         SELECT ref_dest
                           FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "accounts
                          WHERE renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY <= '$current_date'
-                           AND invoice_type != 0
-                        )
-                    AND contact_role <> " . $restrictedRole
+                           AND invoice_type != 0 )"
             );
         }