Reputation: 1069
I want to know what roles a logged in user belongs to without having to check the user against all possible roles (i.e. using Page.User.IsInRole())
Upvotes: 39
Views: 41120
Reputation: 67
try this if you want to check the currently logged in user for specific role:
Roles.IsUserInRole("Admin")
Upvotes: 1
Reputation: 1069
Roles.GetRolesForUser()
Or
Roles.GetRolesForUser(String)
if not targeting the currently logged in user.
Upvotes: 67