ingroup
Description
The ingroup() function determines whether the specified user is a member of the specified group.
Syntax
result = ingroup(user, group);
Arguments
users | Required. A username. |
group | Required. A group name. |
Return Values
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.