[PHP]
function display($tpl = null) {
$user = & JFactory::getUser();
$app =& JFactory::getApplication();
if(!$user->guest){
parent::display($tpl);
}else{
$app->redirect(‘index.php?option=com_user&view=login’);
}
}
[/PHP]