Gets a list of users in a specified role where the user name contains the specified user name to match.
Namespace:
Novalys.VisualGuard.Security.MembershipAssembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 3.2.912.1 (3.2.912.01)
Syntax
C# |
---|
public static VGMembershipUserCollection FindUsersInRoleById( Guid roleId, string usernameToMatch ) |
Visual Basic (Declaration) |
---|
Public Shared Function FindUsersInRoleById ( _ roleId As Guid, _ usernameToMatch As String _ ) As VGMembershipUserCollection |
Parameters
- roleId
- Type: System..::.Guid
The repository of the role to search in.
- usernameToMatch
- Type: System..::.String
The user name to search for.
Return Value
A string array containing the names of all the users whose user name matches usernameToMatch and who are members of the specified role.Remarks
Wildcards such as asterisks and question marks can be used in the usernameToMatch parameter value.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | usernameToMatch is null. |
System..::.ArgumentException |
roleId was not found in the repository for belongs to another application.
-or- usernameToMatch is an empty string. |