Skip to end of banner
Go to start of banner

addUserToGroup

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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

userNameOrKey

stringYesUser name or key of a user to add into a group.
groupNamestringYesName 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

  • No labels