Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How to get the member groups of current member in Umbraco 10?
us the MemberManager service
var currentUser = _memberManager.GetCurrentMemberAsync().Result; var roles = _memberManager.GetRolesAsync(currentUser).Result;
To get all the member groups then you have to use the IMemberGroupService
_memberGroupService.GetAll();
To get a particular member details then, there you have to use IMemberManager
_memberManager.GetRolesAsync(user)
And to get the current user
_memberManager.GetCurrentMemberAsync()
If you have the userId or Email then
Id:
_memberManager.FindByIdAsync(UserId)
Email:
_memberManager.FindByEmailAsync(email)
Use .Result to get the result value from Task<TResult>
Task<TResult>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Find the member group of a member in umbraco 10
How to get the member groups of current member in Umbraco 10?
us the MemberManager service
To get all the member groups then you have to use the IMemberGroupService
To get a particular member details then, there you have to use IMemberManager
And to get the current user
If you have the userId or Email then
Id:
Email:
Use .Result to get the result value from
Task<TResult>
is working on a reply...