From 79dfe13afd82576945703ce0f78b4be422db6d8f Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 16 Nov 2018 11:34:51 -0500 Subject: [PATCH] Fix for switching expired user to not display on front end. 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 | 6 +++--- models/admin/ajax/billingFlagExpiredUsers.php | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index ca1737d..6fabc96 100644 --- 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 * @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. diff --git a/models/admin/ajax/billingFlagExpiredUsers.php b/models/admin/ajax/billingFlagExpiredUsers.php index 0f0e5c9..e63f9fb 100644 --- a/models/admin/ajax/billingFlagExpiredUsers.php +++ b/models/admin/ajax/billingFlagExpiredUsers.php @@ -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 )" ); } -- 2.17.1