Joomla is a Most Popular Opensource and Content Management System.In this blog we have to get current user details of joomla Login User.
Example code :
$user =& JFactory::getUser();
//print_r($user);
echo $user->username; 
 
Here JFactory is provides access to a group of core Joomla Objects. and
$user =& JFactory::getUser(); Means Returns a reference to the 
global user object, only creating it if it doesn't already exist. The object returned will be of type Juser.

No comments:
Post a Comment
Thanks....