Home > Backend Development > PHP Tutorial > typecho如何获取当前登录用户权限

typecho如何获取当前登录用户权限

WBOY
Release: 2016-06-06 20:18:59
Original
2254 people have browsed it

我想在首页判断当前登录用户的权限,如订阅者,管理员等,该如何判断呢?

回复内容:

我想在首页判断当前登录用户的权限,如订阅者,管理员等,该如何判断呢?

我想说你能多思考多看文档吗>?

在模板文件中获取用户所属权限组:

<code>echo "当前用户所属分组:".get_object_vars ($this->user)['row']['group'];</code>
Copy after login

有关权限控制的说明文档:
http://docs.typecho.org/develop/acl

typecho如何获取当前登录用户权限

Related labels:
php
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template