0
votes

I have created members in umbraco, which can login (frontend), to a user area.

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.

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.

But how do i get the information set in backend ?

1

1 Answers

0
votes

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 -

var properties = member.Properties;

This is a PropertyCollection object, which is a KeyedCollection - and ultimately can be iterated over, or searched.