3.1.5.4 FindUsersInRole
This method returns an array of user names that match the specified user name, for the specified role name.
Declaration
// C# public override string[ ] FindUsersInRole(string roleName, string userNameToMatch);
Parameters
-
roleNameThe role name being searched for in the database.
-
userNameToMatchThe user name being searched for.
Return Value
A string array that contains user names in the specified role that match the specified userNameToMatch parameter.
Exceptions
ArgumentNullException - The roleName or userNameToMatch parameter is null.
OracleException - An Oracle-related error has occurred.
System.Configuration.Provider.ProviderException - The role name does not exist in the database.
ArgumentException - One of the following conditions exists:
-
The
roleNameparameter is an empty string, contains a comma, or is longer than 256 characters. -
The
userNameToMatchparameter is an empty string or is longer than 256 characters.
Remarks
This method returns an array of user names that match the specified user name, for the specified role name. This method supports Oracle wildcard characters. If the userNameToMatch parameter is set to "oraUser%", then an array is returned for users such as "oraUser1", "oraUser2", and so on. However, if the userNameToMatch parameter is set to "oraUser", then the array is returned with just the username "oraUser", if there is an "oraUser".