Home> CMS Tutorial> PHPCMS> body text

How does phpcms determine whether the user is logged in?

Release: 2020-01-11 16:45:42
Original
2575 people have browsed it

How does phpcms determine whether the user is logged in?

How phpcms determines whether the user is logged in:

First get the userid

Copy after login

and then determine whether it is empty

{if $userid} 。。。这里写已经登录之后的代码。。。 {else} {/if}
Copy after login

phpcms determines whether the user is logged in. The implementation code is in index.php of phpcms/modules/member/:

;;; '.get_nickname().' 欢迎回家 ;'.L('member_center').'; | ;发布信息; | ;'.L('logout').';'; $res["message"] = pc_base::load_config('system', 'charset') == 'gbk' ? iconv('utf-8', 'utf-8', $res["message"]) : $res["message"]; //get_nickname();//, } else{ $res["success"]=0; } if($jsoncallback){ echo $jsoncallback . "({\"items\":[".json_encode($res)."]})"; }else{ echo json_encode($res); } //echo json_encode($res); } } ?>
Copy after login

PHP Chinese website, a large number of freePHPCMS tutorials, welcome Online Learning!

The above is the detailed content of How does phpcms determine whether the user is logged in?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!