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 2ConfluenceUser confluenceUser = AuthenticatedUserThreadLocal.get();
Note that if there is no logged in user, then the user object returned will be null
.
Rate this page: