Members.GetCurrentMember() - check if Member belongs to a Member Group
Hi,
I'm sure I'm missing something obvious but is there a missing property of UmbracoMemberGroups? How do you tell if the current logged in user belongs to a certain group?
I'm trying to customise a logged in view depending on wether a user is "basic" or "full". The only way I can see to do it is to double up and create my own property and store the groups again? Surely I'm missing something obvious!
Members.GetCurrentMember() - check if Member belongs to a Member Group
Hi,
I'm sure I'm missing something obvious but is there a missing property of UmbracoMemberGroups? How do you tell if the current logged in user belongs to a certain group?
I'm trying to customise a logged in view depending on wether a user is "basic" or "full". The only way I can see to do it is to double up and create my own property and store the groups again? Surely I'm missing something obvious!
Steve
Hi
Try Members.IsMemberAuthorized - you can pass in a list of groups to check if the user is in them or not.
Is there no way to do this for a specific member? All the documentation I have found only outlines doing this for the 'CurrentUser'.
It would be nice to have a function like this:
Perfect - I would have expected a method under from the MemberHelper but I supose this is because it's IPublishedContent?! Either way that works.
you can also use the .net security for this
User.IsInRole(groupName)
is working on a reply...