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

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.