In Joomla 1.0, the current User object was stored in a global variable called $my. This doesn't exist in Joomla 1.5 any more - how do I get that object? Also, how can you tell if the user hasn't logged in?
From stackoverflow
-
Information found at http://docs.joomla.org/Accessing_the_current_user_object
$user =& JFactory::getUser();And how to tell if they've logged in, or if they're just a guest:
if ($user->guest) { echo "Please log in."; } else { echo "Welcome!"; }
0 comments:
Post a Comment