Created
October 9, 2014 07:53
-
-
Save yanhua365/6a79529636c6636826c8 to your computer and use it in GitHub Desktop.
discuz论坛判断用户是否登录的功能
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//$_G['uid'] 表示注册用户的的 id 号,如果用户已经登录,该变量非空! | |
//通过判断 $_G['uid'] 是否为空来判断用户是否已经登录,如果没有登录,则调用 showmessage 提示用户登录或者注册! | |
if(empty($_G['uid'])) { | |
showmessage('to_login', '', array(), array('showmsg' => true, 'login' => 1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment