After a lot of debugging I believe I have it coded to support J4 however all I get is a blank page whether logged in or not.
Code:
<?phpuse Joomla\CMS\Factory;ini_set('display_errors', 1);error_reporting(E_ALL);// Assuming you're using Joomla 4, include necessary Joomla filesdefine('_JEXEC', 1);define('JPATH_BASE', __DIR__);// Load the Composer autoloaderrequire_once JPATH_BASE . '/libraries/vendor/autoload.php';// Start the Joomla application.$app = Factory::getApplication('site');defined('_JEXEC') or die;// Require Joomla framework filesrequire_once JPATH_BASE . '/libraries/vendor/defines.php';require_once JPATH_BASE . '/libraries/vendor/framework.php';echo "Before user check"; // Add this line for debugging// Make sure we are logged in.if (Factory::getUser()->id == 0) { die("Access denied: login required.");}echo "After user check"; // Add this line for debugging
Statistics: Posted by Sc00by121 — Mon Feb 05, 2024 7:07 pm