ingroup

The ingroup() function determines whether the specified user is a member of the specified group.

result = ingroup(user, group);
users Required. A username.
group Required. A group name.
true User is a member of group.
false User is not a member of group or the user or group is null or invalid.
result = ingroup("user1", "admgroup");

In this example, result contains an integer value 1 if user1 belongs to the group admgroup. result contains an integer value 0 if user1 does not belong to group admgroup.

For more information, please see the following: