I wanted to know the list of site role names assigned for the user. So I tried as follows,
List<Role> userRolesList = RoleLocalServiceUtil.getUserRoles(userid);
if (userRolesList != null) {
for (Role role : userRolesList) {
System.out.println("rolesID:"+ role.getTypeLabel());
}
}
I am able to see the user regular type roles only. Not site types. But in my case the user is a site administrator. So How can I get the users site roles names by using api calls?