|
UserInfoUserIsInLocalGroup Method
|
Determines if user is in the specified local groupName.
Namespace: GSF.IdentityAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax Public Shared Function UserIsInLocalGroup (
groupName As String,
userName As String
) As Boolean
static member UserIsInLocalGroup :
groupName : string *
userName : string -> bool
GSF.Identity.UserInfo.UserIsInLocalGroup = function(groupName, userName);
View SourceParameters
- groupName String
- Group name to test.
- userName String
- User name to test.
Return Value
Booleantrue if user is in group; otherwise,
false.
Exceptions Remarks
This function will handle Windows service virtual accounts by specifying the complete virtual account name,
such as @"NT SERVICE\MyService", as the userName. This function can also detect
Active Directory user accounts and groups that may exist in the local group when the userName
is prefixed with a domain name and a backslash "\".
See Also