Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter name

Type

Required

Description

group

string / string[]

Yes

Name(s) of the group(s) the user should belong to.

user

string

Yes

Name or key of the user that needs to be verified.

Return type

boolean (true/false)

A A "true" return value means that the user associated with the specified username or userkey belongs to the given group(s).

...

Code Block
userInGroup("Administrators", "Admin1");

Returns: True Returns "true" if Admin1 is included in Administrators group and "Administratorsfalse" group or False if Admin1 is not included in Administrators group.

Example 2

Code Block
userInGroup("Users", currentUser());

...

Code Block
string[] groups = {"Administrators", "Users"};
userInGroup(groups, currentUser());

Returns: True Returns "true" if the current user is included in "Users" or "Administrators" group, or False in Users or Administrators  group and "false" if the current user is not included neither in "Users" nor in "Administrators" groupUsers nor in Administrators group.

Notes

Note

The look-up is first made after the userkey, then after the username.

...