I am creating an External Application and that will be attached to Joomla using JUMI.
I want to obtain the current USERNAME and then it is stored in my database (of the external script) and then next time if that user login again, he will be able to see his records on my application.
I am using folllowing code:
Just these 2 lines on the top of my script.
Code: Select all
$user =& JFactory::getUser();
$userId = $user->get('username');
Is it OK ? or its not the correct way to do this ?
Please guide
regards
Zeeshan