Script - user list (groovy)

List all users

How to use

Example scripts can be used in one of 3 different ways:

View source

Requirements

  1. Scripting for Confluence 4.3 or above
  2. Confluence 4.2 or above

Tested

This script (latest version in Bitbucket) is tested during release testing using GINT

All users

{groovy:output=wiki|script=#https://bitbucket.org/bob_swift/examples/raw/tip/confluence/groovy/userList.groovy}
{groovy}

All users with code copied to macro body

{groovy:output=wiki}
/**
 * Get a list of all users
 * Requires: output=wiki
 * Requires: Scripting for Confluence 4.3 or above
 * Requires: Confluence 4.1 or above
 */
 
out.println "|| User ID || Full name || Email ||"
userAccessor.getUsersWithConfluenceAccessAsList().sort().each { user ->
    out.println "| $user.name | [~$user.name] | [mailto:$user.email] |"
}
{groovy}

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.