简体   繁体   English

Umbraco后端会员信息

[英]Umbraco Backend Member information

I have created members in umbraco, which can login (frontend), to a user area. 我已经在umbraco中创建了成员,该成员可以登录(前端)到用户区域。

I have also under members in umbraco, created fields, with information like profile picture, address, phone etc. which i can set in the backend of umbraco. 我也在umbraco的成员下,创建了字段,其中包含个人资料图片,地址,电话等信息,这些信息可以在umbraco的后端中进行设置。

But i would also like to display that information in the user area, which the member logs into. 但我也想在会员登录的用户区域中显示该信息。

but i haven't been able to find a way, to get that information out. 但我一直无法找到一种方法来获取这些信息。

i can use membership.getuser() , to get the current user logged in. 我可以使用membership.getuser()来获取当前用户的登录信息。

But how do i get the information set in backend ? 但是我如何获取后端设置的信息?

I would use something like 我会用类似的东西

//first, get the member
var member = ApplicationContext.Current.Services.MemberService
            .GetByUsername(HttpContext.Current.User.Identity.Name);

The properties of the member are now available in the Properties collection - 成员的Properties现在可以在“ Properties集合中使用-

var properties = member.Properties;

This is a PropertyCollection object, which is a KeyedCollection - and ultimately can be iterated over, or searched. 这是一个PropertyCollection对象,它是一个KeyedCollection最终可以迭代或搜索。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM