Retrieve User id - Joomla! Forum - community, help and support


hi,

i need know how user id current session in php. i'm using joomla! 1.0.15, need retrieve user id variable input table in same joomla database.

i tried using code user id:

code: select all

define( '_jexec', 1 );
   define('jpath_base', 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');
   $mainframe->initialise();
   
   $mainframe->route();
   $user =& jfactory::getuser();
   print_r($user);


but can see works joomla 1.5, need user id in joomla 1.0.15?

assuming custom code runs component in joomla 1.0 framework, can retrieve userid global array $my:

code: select all

global $my;
$user_id = $my->id;





Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO