win32net.NetUserGetLocalGroups

[groupName, ...] = NetUserGetLocalGroups(serverName, userName , flags )

Retrieves a list of local groups to which a specified user belongs.

Parameters

serverName : string

The name of the remote server on which the function is to execute. None or an empty string specifies the server program running on the local computer.

userName : string

The name of the user to search for in each group account. This parameter can be of the form <UserName>, in which case the username is expected to be found on servername. The user name can also be of the form <DomainName>\\<UserName> in which case <DomainName> is associated with servername and <UserName> is expected to be to be found on that domain.

flags=LG_INCLUDE_INDIRECT : int

Flags for the call.

To Do

This needs to be extended to support the new model, while not breaking existing code. A default arg would be perfect.