wntMemberGrps

Returns a list of groups to which the specified user belongs.

Syntax:

wntMemberGrps(server-name, user-name, group-type, flags[, output-format-flags[, input-format-flags]])

Parameters:

(s) server-name: name of a network file server ("\\MYSERVER") or ("") for a local PC.

(s) user-name: name of the current user.

(i) group-type: @LOCALGROUP or @GLOBALGROUP

(i) flags: 1 - with group-type of @LOCALGROUP to include groups in which user is an indirect member. Otherwise, set to 0.

(i) output-format-flag: [optional] Controls the format of the group names that are returned.

Value

Meaning

0

(default) group names.

1

group names will have domain names prefixed on to them, except in cases where the domain name is "BUILTIN" or "NT AUTHORITY".

2

group names will have domain names prefixed on to them in all cases.

4

SID values will be returned in place of group names.

8

SID values will be returned in place of group names, but the SID strings will only be for SID values that could not be resolved to  group account names [e.g. orphaned SIDs].

 

(i) input-format-flag: [optional] controls how the user-name parameter value is interpreted.

Value

Meaning

0

(default) actual user account name.

1

user-name contains a SID value instead of an actual user account name.

 

Returns:

(i) a tab delimited list of groups.

Example:
; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

groups=wntMemberGrps("","jdoe",@LOCALGROUP,1,1,0) AskItemlist("jdoe is associated with",groups,@TAB,@SORTED,@SINGLE) Exit
See Also:

wntMemberSet, wntMemberDel