How do I find the logged in user?

How do I find the logged in user?

This can be retrieved easily 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.

ConfluenceUser confluenceUser = AuthenticatedUserThreadLocal.get();

Should the user not be logged in the user object will be null.

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport