Skip to end of banner
Go to start of banner

Script - User list (groovy and beanshell)

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 3 Next »

List all users

Confluence 3.x and above

Actual classes may differ depending on your version of confluence

Does not work with LDAP

Groovy

{groovy:output=wiki} 
import com.atlassian.confluence.user.UserAccessor 
import com.atlassian.spring.container.ContainerManager

out.println "|| User ID || Full name || Email ||"

UserAccessor userAccessor = (UserAccessor)ContainerManager.getComponent("userAccessor");

userAccessor.getUsersWithConfluenceAccessAsList().each { user ->
    out.println "| $user.name | [~$user.name] | [mailto:$user.email] |"
}
{groovy}
  • No labels