How to get current Joomla user with external PHP script
- by Joey Adams
I have a couple PHP scripts used for AJAX queries, but I want them to be able to operate under the umbrella of Joomla's authentication system. Is the following safe? Are there any unnecessary lines?
joomla-auth.php (located in the same directory as Joomla's index.php):
<?php
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__));…