mardi 9 avril 2019

Accessing Joomla current user object in joomla subdirectory

i am using the following code to access the joomla current user object in its sub directory , but it's not working. Is there is any solution to get the joomla current user object in joomla sub directory , might the files are not including properly.

    define( '_JEXEC', 1 );
    define( 'JPATH_BASE', realpath(dirname(__FILE__).'/../..' ));

    require_once ( JPATH_BASE. '/includes/defines.php' );
    require_once ( JPATH_BASE. '/includes/framework.php' );
    $user = JFactory::getUser();




Aucun commentaire:

Enregistrer un commentaire