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: 2017.0.101.17 (2017.0.101.17)
Syntax
C# |
---|
[ObsoleteAttribute("This class is obsolete now, plz use VGSecurityManager.Runtime.Roles", true)] public static string[] FindUsersInRole( string roleName, string usernameToMatch ) |
Visual Basic |
---|
<ObsoleteAttribute("This class is obsolete now, plz use VGSecurityManager.Runtime.Roles", true)> Public Shared Function FindUsersInRole ( roleName As String, usernameToMatch As String ) As String() |
Parameters
- roleName
- Type: System..::..String
The role to search in. For shared role the value must be prefixed by '#'.
- usernameToMatch
- Type: System..::..String
The user name to search for.
Return Value
Type: array<String>[]()[][]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 | roleName is null (Nothing in Visual Basic).
-or- usernameToMatch is null. |
System..::..ArgumentException | roleName is an empty string or contains invalid invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',') or is longer than 64 characters.
-or- role identified by roleName does not exists in the repository.-or- usernameToMatch is an empty string. |