Returns an array with all user groups.
Syntax
Security.getUserGroups()
Arguments
No arguments.
Return value
Returns an array with all user groups.
When Dynamic permissions are in effect, users may belong to more than one group. Security.getUserGroups() returns dictionary where keys are user group names and values are true.
Example
This example shows how to print the groups if they include a group named accounts.
dynamic groups = Security.getUserGroups();
if( groups["accounts"] ) {
MVCFunctions.print_r (groups);
}
Sample output
{"newgroup":true,"accounts":true,"devs":true,"<Admin>":true}
See also:
•Security: User group permissions