Jake Vanderwerf
2026-01-20 7a9054bb3f033c98067b3196378311dae54c5fbf
inc/managers/DashboardManager.php
@@ -100,12 +100,24 @@
     */
    public function redirectFromAdmin()
    {
      // Skip if already processing a redirect
      if (defined('DOING_AJAX') && DOING_AJAX) {
         return;
      }
      // Ensure user is fully loaded
      if (!did_action('wp_loaded')) {
         return;
      }
        // Allow admins to access wp-admin if needed
        if (current_user_can('manage_options')) {
            return;
        }
        // Redirect to custom dashboard
         $this->redirectToDashboard();
         if (is_user_logged_in() && isOurPeople()) {
         $this->redirectToDashboard();
      }
    }
   protected function redirectToLogin():void
@@ -198,7 +210,6 @@
         if (!in_array($page, $allowedPages)) {
            error_log("User not allowed to access page: {$page}");
            $this->redirectToDashboard();
            return;
         }
      }
   }
@@ -680,6 +691,7 @@
                <ul>
                    <?= jvbNotificationMenu() ?>
                    <?= jvbHelpMenu() ?>
                    <li><a href="<?=wp_logout_url(get_home_url())?>" title="Logout"><?=jvbIcon('sign-out')?></a></li>
                </ul>
            </nav>
        </header>