VGRolesFindUsersInRole Method
|
Note: This API is now obsolete.
Gets a list of users in a specified role where the user name contains the specified user name to match.
Namespace:
Novalys.VisualGuard.Security.Membership
Assembly:
Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.0.101.19 (2019.0.0101.19)
Syntax [ObsoleteAttribute("This class is obsolete now, plz use VGSecurityManager.Runtime.Roles",
true)]
public static string[] FindUsersInRole(
string roleName,
string usernameToMatch
)
<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: SystemString
The role to search in. For shared role the value must be prefixed by '#'. - usernameToMatch
- Type: SystemString
The user name to search for.
Return Value
Type:
StringA string array containing the names of all the users whose user name matches usernameToMatch and who are members of the specified role.
Exceptions Exception | Condition |
---|
ArgumentNullException | roleName is null (Nothing in Visual Basic).
-or- usernameToMatch is null. |
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. |
Remarks Wildcards such as asterisks and question marks can be used in the usernameToMatch parameter value.
See Also