usergroupdata(U)

Returns a comma-separated list of the groups in which a user ID is a member. (Available as of version 13.16)

Syntax

usergroupdata(U)

Input

Argument Type Description
U text The user ID about which you would like information. If U is omitted, the default behavior is to return group information for the current UID.
Note: The user ID passed to U must be the user with the current session. No one may access user data other than that of the current ID.

Return Value

Returns a comma-separated list of the groups of which U is a member. This includes direct membership as well as transitive membership.

Example

The following example creates a column named groups that contains a comma-separated list in which the current UID is a member.

<base table="default.lonely"/>
<willbe name="groups" value="usergroupdata()"/>
<colord cols="groups"/>