| UserAccountControlIsUserInGroup Method |
Determines whether the current user is in the specified group.
Namespace:
TomsToolbox.Desktop
Assembly:
TomsToolbox.Desktop (in TomsToolbox.Desktop.dll)
Syntax public static bool IsUserInGroup(
SafeTokenHandle userToken,
string groupName
)
Public Shared Function IsUserInGroup (
userToken As SafeTokenHandle,
groupName As String
) As Boolean
Parameters
- userToken
- Type: TomsToolbox.DesktopSafeTokenHandle
The user token. - groupName
- Type: SystemString
Name of the group.
Return Value
Type:
Booleantrue if the user blongs to the specified group; otherwise
falseSee Also