Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

logged in user detail

Avatar

Level 2

I have implemented Preprocessor for one of my use case to detect the activity and do some processing. Something like 

 

public void preprocess(ReplicationAction replicationAction, ReplicationOptions replicationOptions) throws ReplicationException {
        if (replicationAction.getType().equals(ReplicationActionType.ACTIVATE)){

            // Need to get the logged in user detail

        }
    }

 

I can get the admin session/details here but i need access to the current logged in user. How can i get that.

 

Can someone help me with this.

 

Thanks 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

This isn't possible, as the replication is working as a background session is not tied to any (authoring) user activity happening on the system.

You might want to find out, which user started this replication action (and which is not necessarily a person), you can use replicationAction.getUserId();

Jörg

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

This isn't possible, as the replication is working as a background session is not tied to any (authoring) user activity happening on the system.

You might want to find out, which user started this replication action (and which is not necessarily a person), you can use replicationAction.getUserId();

Jörg