Syntax
addUserToGroup(userNameOrKey, groupName)
Description
Adds a single user to a group if the user is not in that group already.Parameters
Parameter | Type | Required | Description |
---|---|---|---|
| string | Yes | User name or key of a user to add into a group. |
groupName | string | Yes | Name of a group to add user into. |
Return type
boolean (true/false)
Returns true if a user was successfully added into a group. Otherwise returns false.
Example
addUserToGroup("jdoe", "confluence-users");
Adds the "jdoe" user into the "confluence-users" group.
See also