Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装了登陆插件,希望在首页显示登陆的用户名,根据文档用{user.DisplayName},但是无效,咋回事呢? #6

Open
BlueCode2019 opened this issue Jan 2, 2020 · 1 comment

Comments

@BlueCode2019
Copy link

文档给的参考内容如下,我现在用的cms 6.0,是不是这个实体内容取消啦?我查文档没有一点关于这方面的介绍。想使用{user.DisplayName}显示登陆的用户名,还需要别的前提吗?
<stl:if type="IsUserLoggin">
stl:yes


您好,{user.DisplayName}
用户中心
购物车
我的订单
<stl:logout class="logout">退出</stl:logout>

</stl:yes>
stl:no

<stl:login style="color:#797979;">登录</stl:login>
<stl:register style="color:#797979;">注册</stl:register>


<stl:login type="weibo" class="weibo">微博登录</stl:login>
<stl:login type="qq" class="qq">QQ登录</stl:login>
<stl:login type="weixin" class="weixin">微信登录</stl:login>

</stl:no>
</stl:if>

@BlueCode2019
Copy link
Author

问题解决,原来是该用户注册时候,没有填写“姓名”,只填写了“用户名”。而调用{user.DisplayName}显示的是“姓名”,因此是个空值,给人感觉没有解析出来。
后来,我尝试在用户注册的时候,要求必须填写姓名(在系统“用户中心设置”处的“用户注册表单字段”添加了姓名,但是没有效果)
请问如何能新用户注册的时候检验是否输入姓名字段呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant