I am trying to validate some member groups from the current user against the groups selected in a component but I have an issue as the groups are returned as the string names from the memberManager.GetRolesAsync, where as they are returned as the ids from the component member group picker
Is there a way to either get the role ids from the member manager or the string names from the group picker? I see I can loop through the ids and get the names using the content service, but that seems really inefficient as all I want to do is match the two lists using an intersect
Also why does the member group picker return ids when all the member service and manager methods take the string name. It just seems really stupid
Member group picker save text instead of id
I am trying to validate some member groups from the current user against the groups selected in a component but I have an issue as the groups are returned as the string names from the memberManager.GetRolesAsync, where as they are returned as the ids from the component member group picker
Is there a way to either get the role ids from the member manager or the string names from the group picker? I see I can loop through the ids and get the names using the content service, but that seems really inefficient as all I want to do is match the two lists using an intersect
Also why does the member group picker return ids when all the member service and manager methods take the string name. It just seems really stupid
Seems a bit clunky but in the end I have done this (I think one call to the member service is better than multiple to the content service)
If anyone has a better solution (like a member group picker that stores group names instead of ids), please feel free to post your answer
is working on a reply...