Joomla中判断用户是否登录

<?php
if (isset($_SESSION[‘auth’][“username”]))
{ echo “Welcome <a href=’index.php?option=com_user&view=user&task=edit’>” . $_SESSION[‘auth’][“username”] . “</a>!”; }
else
{ echo “<a href=’index.php?option=com_user&view=login’>Log in</a>”; }
?>

发表评论

邮箱地址不会被公开。 必填项已用*标注