I am having troubble finding documentation for member groups.
I have a member group picker, wich returns the member group ID's. But I am having touble figuring out how to get the meber group ID from current logged in member.
The closest I have gotten is this Members.GetUserRoles(member.Email).FirstOrDefault() but that only gives me the name.
I am so lost right now. Dose anyone know how I could accomplish this
Member groups
Hello!
I am having troubble finding documentation for member groups.
I have a member group picker, wich returns the member group ID's. But I am having touble figuring out how to get the meber group ID from current logged in member.
The closest I have gotten is this
Members.GetUserRoles(member.Email).FirstOrDefault()
but that only gives me the name.I am so lost right now. Dose anyone know how I could accomplish this
Thanks!
//Johannes
How about using
MemberGroupService.
With that, you can get the id by passing the group name here
Services.MemberGroupService.GetByName("groupNameHere").Id
.Thank you so much Renate!
So the code will look like this...
I can't help feeling that there is a much simpler way of doing this.. It feels like I am doing it wrong. Any tought @Renate?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.