User routines
User routines
This section contains routines that enable you to handle users.
Routines Summary
- addUserToContentPermission — Adds a single user to a content permission if the user is not already in that permission.
- addUserToGroup — Adds a single user to a group if the user is not in that group already.
- addUserToSpacePermission — Adds a single user to a space permission if the user is not already in that permission.
- currentUser — Returns the key for the user that invoked the script.
- currentUserFullName — Returns the full name (firstname, lastname) of the user that triggered the script.
- currentUserName — Returns the user name (login) for the user that invoked the script containing currentUserName.
- getUser — Gets the user by username or key.
- getUserByEmail — Gets the user by email address.
- getUserByFullName — Gets the user by their full name.
- getUserDirectoryName — Returns the directory name the user belongs to (takes user name or key as a parameter).
- getUserKeysFromEmails — Finds the corresponding user keys for a list of email addresses.
- getUserProperty — Gets the specified user property.
- hasUserProperty — Checks if the user has the given property set.
- isAnyUserAuthenticated — Verifies if there is a logged in user.
- removeAllUserRestrictionsFromContent — Removes all user restrictions on the page for the user
- removeUserFromContentPermission — Removes a single user from a content permission if the user is in that permission.
- removeUserFromSpacePermission — Removes a single user from a space permission if the user is in that permission.
- setUserProperty — Sets properties of users.
- userContentPermissions — Returns the permissions of the provided user for the specified content.
- userEmailAddress — Returns email address of the selected user. The email address may be needed to supply it to the various external systems.
- userExists — Checks whether the specified user is a registered Confluence user.
- userFullName — Returns the full name (firstname and lastname) of the specified user.
- userGroups — Returns the groups where the selected user belongs.
- userHasAccessToComment — Verifies whether a comment is visible for a user.
- userHasContentPermission — Checks if a user has the specified content permission.
- userHasSpacePermission — Checks if a user has the specified space permission.
- userInGroup — Verifies whether the selected user is in the selected group(s).
- userKeyToUserName — Returns user name of the user with the provided user key.
- userLanguage — Returns the language for a user.
- userNameToUserKey — Returns the user key for the provided user name.
- usersInGroups — Returns a list of users common to all the specified groups.
- usersInSpacePermission — Returns users that correspond to a certain permission in the specified space.
- userSpacePermissions — Returns the permissions of the provided user in the space.
- getNewUserFromEvent — Retrieves a structure containing information about an user that has been created or updated.
- getOldUserFromEvent — Retrieves a structure containing information about a user that has been deleted.
- isUserActive — Routine that verifies if a user is active.
- runAs — Assumes a user when running a script.
Peacock
, multiple selections available,
Need support? Create a request with our support team.
Copyright © 2005 - 2025 Appfire | All rights reserved.