Added some debug output to front controller and attempting to lock user down for...
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 5 Dec 2017 21:32:37 +0000 (16:32 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 5 Dec 2017 21:32:37 +0000 (16:32 -0500)
controllers/front.php
models/admin/member/index.php

index 50a4617..f24d84b 100644 (file)
@@ -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)) {
index ded6761..5063861 100644 (file)
@@ -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 {