Skip to main content
edited title
Link
Mark Cassidy
  • 25.4k
  • 7
  • 59
  • 117

Sitecore UserRoles Getting User Roles from Username

added 41 characters in body; edited tags
Source Link
Mark Cassidy
  • 25.4k
  • 7
  • 59
  • 117

How todo I get user rolesUser Roles based on username.Username?

UserRoles roles = user.Roles;
string role = roles.GetEnumerator().ToString();

If I have a user, I can i get user roleit like this.

Please suggest me easy way But how do I get the roles when all I have is a Username?

How to get user roles based on username.

UserRoles roles = user.Roles;
string role = roles.GetEnumerator().ToString();

can i get user role like this.

Please suggest me easy way

How do I get User Roles based on Username?

UserRoles roles = user.Roles;
string role = roles.GetEnumerator().ToString();

If I have a user, I can get it like this. But how do I get the roles when all I have is a Username?

Source Link

Sitecore UserRoles

How to get user roles based on username.

UserRoles roles = user.Roles;
string role = roles.GetEnumerator().ToString();

can i get user role like this.

Please suggest me easy way