Hiding Modules when a User Logs In

<?php // Get the user object $user = &JFactory::getUser(); 

// Now work out the User ID $userId = $user->get('id'); 

// Now hide the module if user is logged in if ($userId == 0) :   

// Now we break out of the PHP tags and display the JDOC tag to include the module 

<jdoc:include type="modules" name="public-right" style="xhtml" />

<?php endif; ?> 


Popular posts from this blog

Set limit wp_nav_menu

Conut document have children that are show in navigation