cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the current user

Nuxeo_User
Confirmed Champ
Confirmed Champ

Hi.Can anyone tell me how to get the current user logged in Nuxeo..I am using NuxeoPrincipal but it comes null.I take it this way: @Context NuxeoPrincipal principal

3 REPLIES 3

Florent_Guillau
World-Class Innovator
World-Class Innovator

In what context do you need the principal? Low-level Java code? Java Operation code? Automation scripting? EL?

Nuxeo_User
Confirmed Champ
Confirmed Champ

In java Operation code

adam_bo_
Star Contributor
Star Contributor

May be this way:

    @Context
    protected OperationContext ctx;

   @OperationMethod
    public DocumentModel run(DocumentModel doc) throws Exception {
        Principal principal = ctx.getPrincipal();
    }
Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.