User name required in PHP Script

Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Wed Jul 16, 2008 1:48 am

User name required in PHP Script

Post by zeeshanhashmi » Thu Aug 21, 2008 3:55 pm


I have a PHP script and that script is attached to Joomla, using Wrapper Iframe.

I want to get the current loggedin user's username. But I cant find a solution.

I tried :

global $my ;

but it has nothing if I echo it. I tried Jfactory, but it shows Fatal Error that Class JFactory is not found.
I tried to add the references to defines.php and framework.php, but even that doen;t helped me. My script is residing in a folder under public_html.

Please help as I am very very depressed !


Return to “Joombie Coding Q/A”