I am trying to run an application outside Joomla (not as a plugin) and I would like to access the logged in user\'s information (userid). I am wondering how should I go abou
The solution showed by Stefan Gehrig
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(dirname(__FILE__)));
define( 'DS', DIRECTORY_SEPARATOR );
require_once (JPATH_BASE . DS . 'includes' . DS . 'defines.php');
require_once (JPATH_BASE . DS . 'includes' . DS . 'framework.php');
$mainframe = JFactory::getApplication('site');
works fine, I have spent many long nights trying access the Joomla! resources outside the joomla folder.
$session = &JFactory::getSession();
In the follow up code, works fine when the getApplication method has been invoked.
Thanks for solution.