group.ContainsUser
Overview¶
Determine whether the "group object" specified in the "Server Script" contains the "User" or the "Dept" to which the "User" belongs.
Syntax¶
Return Value¶
If the specified "User" is included, true is returned. If not, false is returned. If the "Dept" to which the specified "User" belongs is included, true is returned.
Usage Examples¶
The following example checks whether the "Group" with group ID 1 contains the logged-in user or the "Dept" to which the logged-in user belongs.
JavaScript¶
let group = groups.Get(1);
if (group.ContainsUser(context.UserId)) {
context.Log('contains');
} else {
context.Log('not contains');
}