Syntax
list getgroups ( string user )
Description
getgroups returns the list of groups to which the specified user belongs from the policy server (or from the client host if getpasswordfromrun is set to yes in the policy server's pm.settings file). If you do not specify a user, it returns the submituser's secondary groups.
The following example returns the list of groups to which root belongs.
Example
# print the list of groups to which root belongs print(getgroups("root"));