Last updated Apr 18, 2019

How do I find the logged in user?

When writing a Confluence app, the user can be retrieved from the com.atlassian.confluence.user.AuthenticatedUserThreadLocal class, which will give you the current logged in user as a com.atlassian.confluence.user.ConfluenceUser object.

1
2
ConfluenceUser confluenceUser = AuthenticatedUserThreadLocal.get();

Note that if there is no logged in user, then the user object returned will be null.

Rate this page: