当前位置:网站首页>A tutorial on how the zblog system obtains user related information based on user ID

A tutorial on how the zblog system obtains user related information based on user ID

2022-06-24 16:48:00 Shell house railing - Wenxi

In the production Zblog Template or modify personalization ZBlog Template function , Sometimes it is necessary to display the relevant information of the current user , For example, you want to display the current article The author's name 、 Avatar and other relevant information , We can use zblog The built-in function of the program calls the relevant information of the user .

reminder : modify Zblog Please keep a copy of the template , Click clear on the background home page after modification cache And recompile the template , Here is zblog According to the user ID Method code for obtaining user related information .

 notes :$userID For the user ID Variable , Change to the user you currently use ID Variable .
 
// User page links 
{$zbp->GetMemberByID($userID)->Url}
// user name 
{$zbp->GetMemberByID($userID)->Name}
// User alias 
{$zbp->GetMemberByID($userID)->Alias}
// User level 
{$zbp->GetMemberByID($userID)->Level}
// User mailbox 
{$zbp->GetMemberByID($userID)->Email}
// User home page 
{$zbp->GetMemberByID($userID)->HomePage}
// User summary 
{$zbp->GetMemberByID($userID)->Intro}
// The avatars 
{$zbp->GetMemberByID($userID)->Avatar}
// Number of articles published by users 
{$zbp->GetMemberByID($userID)->Articles}
// Number of user comments 
{$zbp->GetMemberByID($userID)->Comments}
原网站

版权声明
本文为[Shell house railing - Wenxi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206241644368782.html

随机推荐