2011-03-07 93 views
0

我要顯示這樣的模塊:如何找出該用戶登錄

if (the user is logged in){ 
    \\ module should be this html(1) 
}else{ 
    \\ module should be like this html(2) 
} 

這可能嗎? 我應該在模板index.php中添加......嗎?

回答

2
$user = JFactory::getUser(); 
if ($user->id){ 
    \\ module should be this html(1) 
}else{ 
    \\ module should be like this html(2) 
} 
相關問題