Joomla简单判断用户是否登录的方法

原创 2017-01-05 15:59:14 237
摘要:本文实例讲述了Joomla简单判断用户是否登录的方法。分享给大家供大家参考,具体如下:<?php if (isset($_SESSION['auth']["username"])) { echo "Welcome <a href='index.php?option=com_user&

本文实例讲述了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>"; }
?>

更多关于Joomla简单判断用户是否登录的方法请关注PHP中文网(www.php.cn)其他文章!


发布手记

热门词条