Determines if the specified user is a member of the specified group on the specified server.
wntMemberGet(server-name, group-name, user-name, group-type[, input-format-flag])
(s) server-name: name of a network file server ("\\MYSERVER") or ("") for a local PC.
(s) group-name: name of the group.
(s) user-name: fully qualified name of the current user. (i.e., domain/user)
(i) group-type: @LOCALGROUP or @GLOBALGROUP
(i) input-format-flag: [optional] controls how the group-name and user-name parameter values are interpreted.
Value |
Meaning |
0 |
User and group name are actual group/user accounts names. |
1 |
group-name contains a SID value instead of an actual group account name. |
2 |
user-name contains a SID value instead of an actual user account name. |
(i) @TRUE if successful; @FALSE if unsuccessful.
Assuming that the person running this script has sufficient authority to query members of the specified group, this function will allow the person to determine if the user is a member of the specified group or not.
Passing in an invalid username to wntMemberGet() causes the error 542. wntUserExist can be called first to make sure that the user exists before calling wntMemberGet().
; Load Appropriate Extender AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
rslt=wntMemberGet("","testgroup","jdoe",@LOCALGROUP,0) If rslt Message("jdoe","is a member of testgroup") Else Message("jdoe","is not a member of testgroup") EndIf Exit