- user
- An System.Security.Principal.IPrincipal that represents the user account to find the role group collection.
A System.Web.UI.WebControls.RoleGroup representing the first role group in the collection that contains the specified user account. If the user is not part of a role group in the collection, it returns null.
The RoleGroupCollection.GetMatchingRoleGroup(System.Security.Principal.IPrincipal) method searches the role group collection and returns the first role group that contains the specified user account. The method searches the collection in the order role groups are added to the collection, and returns only the first matching role group.
If the specified user account is not part of any of the role groups in the collection, null is returned.
You must configure role management to use the RoleGroupCollection.GetMatchingRoleGroup(System.Security.Principal.IPrincipal) method. For more information, see Understanding Role Management.