How to get the current user object in Joomla 1.5?
1 answer
Information found at http://docs.joomla.org/Accessing_the_current_user_object
$user =& JFactory::getUser();
And how to tell if they are logged in, or if they are just a guest:
if ($user->guest) {
echo "Please log in.";
} else {
echo "Welcome!";
}
+5
source to share