The idea behind this is to actually load a particular position (the menu position) only if the user has not logged in:
Joomla 1.0
if( !$my->id )mosLoadModules ( 'left' );
and should be placed in the index.php of the template you are using (/templates/
if( !$my->id )mosLoadModules ( 'hidingmenu' );
Joomla 1.5
This has changed for J1.5
$user =& JFactory::getUser();
$user_id = $user->get('id');
This returns the user id of the user. Therefore the code to do this is check whether the current user has a valid id (i.e. they are logged), if not load the module:
$user =& JFactory::getUser();
$user_id = $user->get('id');
if (!$user_id)
{
?>
}
?>
0 comments:
Post a Comment