Is it possible to get information on the group or type of the currently logged in member? I have a site with a login feature and want to show the member different content dependending on what group the current member is in, or potentially the member type.
Currently I can retrieve the three properties associated with the current member using the following code:
@using umbraco.cms.businesslogic.member
@{ var member = Member.GetCurrentMember(); <p>@member.Id - @member.Text - @member.ParentId</p> }
Is there a method that allows me to retrieve group/type information based on this code?
Sadly, for users new to umbraco like me, this does not help. My task is twofold: firstly, i need to get the member groups of the current logged-in member and then secondly, to display all the content pages in these groups, both tasks in the context of an xslt file; in other words, display all content that the logged-in member is allowed to access. I have so far failed to find a good enough explanation and example that explains either of these tasks. Would appreciate it greatly should anyone like to provide a full and complete explanation of : (1) how to get the member groups of the current logged-in member, and also (b) how to get all content pages belonging to a member group.
Retrieving member group & type of current member
Hi Everyone,
Is it possible to get information on the group or type of the currently logged in member? I have a site with a login feature and want to show the member different content dependending on what group the current member is in, or potentially the member type.
Currently I can retrieve the three properties associated with the current member using the following code:
Is there a method that allows me to retrieve group/type information based on this code?
Kind Regards,
mmmoustache
Hi mmmoustache,
Normally you can use all functionalities of the ASP.Net memebrship provider. So, to check if the user is in a particular role, you can use the method
Hope this helps
Cheers,
Michael.
Sadly, for users new to umbraco like me, this does not help. My task is twofold: firstly, i need to get the member groups of the current logged-in member and then secondly, to display all the content pages in these groups, both tasks in the context of an xslt file; in other words, display all content that the logged-in member is allowed to access. I have so far failed to find a good enough explanation and example that explains either of these tasks. Would appreciate it greatly should anyone like to provide a full and complete explanation of : (1) how to get the member groups of the current logged-in member, and also (b) how to get all content pages belonging to a member group.
Cheers
mark.
is working on a reply...