From: Chuck Scott Date: Tue, 5 Dec 2017 21:32:37 +0000 (-0500) Subject: Added some debug output to front controller and attempting to lock user down for... X-Git-Tag: v2.10.23^2~23^2~12 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=873a5318b69cd583ece4c63e86590cd090c9a272;p=WP-Plugins%2Fglm-member-db.git Added some debug output to front controller and attempting to lock user down for a certain defect. --- diff --git a/controllers/front.php b/controllers/front.php index 50a46173..f24d84b3 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -470,7 +470,11 @@ class glmMembersFront extends GlmPluginSupport */ // Get name of plugin where model and view are located - and set the view path - $plugIn = $this->config['validActions']['frontActions'][$menuItem][$action]; + if (isset($this->config['validActions']['frontActions'][$menuItem][$action])) { + $plugIn = $this->config['validActions']['frontActions'][$menuItem][$action]; + } else { + trigger_error("Front Controller: Invalid Action - menu = $menuItem, action = $action", E_USER_NOTICE); + } // Build model and path and class names $modelName = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH . "$plugIn/models/front/$menuItem/$action.php"; @@ -488,7 +492,9 @@ class glmMembersFront extends GlmPluginSupport // Otherwise, load and run the model } else { -// trigger_error("Front Controller: Loading ... Model = $modelName, Action = $action, Class = $className"); + if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG) { + trigger_error("Front Controller: Loading - Model = $modelName, Action = $action, Class = $className", E_USER_NOTICE); + } // Load the model file, if it hasn't already if (!class_exists($className)) { diff --git a/models/admin/member/index.php b/models/admin/member/index.php index ded67617..50638615 100644 --- a/models/admin/member/index.php +++ b/models/admin/member/index.php @@ -122,6 +122,11 @@ class GlmMembersAdmin_member_index extends GlmDataMembers if ($lockedToMember) { $memberID = $lockedToMember; + // Next make darn't sure they are admin or members manager before checking for other member ID. + } elseif (!apply_filters('glm_members_menu_members', false)) { + + wp_die('There has been a member access check failure. Please call for support.'); + // Otherwise Check for other member selection options } else {