Visual Guard Class Library Documentation

VGRoles.FindUsersInRoleById Method 

Gets a list of users in a specified role where the user name contains the specified user name to match.

public static VGMembershipUserCollection FindUsersInRoleById(
   Guid roleId,
   String usernameToMatch
);

Parameters

roleId
The repository of the role to search in.
usernameToMatch
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 Type Condition
ArgumentNullException usernameToMatch is null.
ArgumentException roleId was not found in the repository for belongs to another application.

-or-

usernameToMatch is an empty string.

See Also

VGRoles Class | Novalys.VisualGuard.Security.Membership Namespace | RepositoryId