Get user information during a listener execution

David Cortabarra Romero via opencms-dev <[email protected]> Fri, 25 Oct 2024 06:27:56 +0000
Newsgroups gmane.comp.cms.opencms.devel
Message-ID <DBAPR05MB73031700E9E379FC5F98B74BE04F2@DBAPR05MB7303.eurprd05.prod.outlook.com>
Hello,

I am working using OpenCms version 16.0. Trying to create a listener that acts when a modification or content creation event occurs, I need to get the user that performed the action.

I do not find this information available at any time during the listener execution because I only have access to the CmsObject and the resource I am acting on.

Inside the CmsObject I can get the context of the request, but the information of the user who has performed the action does not appear there, only the information of the user used to initialise the listener.

On the other hand, I have no way to obtain the session of the specific user who performed the action. I can get the session of all the users that are inside the system, but I have no way of knowing which one is related to the user that has performed the action. Finally, I also don't have access to the request made, where I could also get the information.

I would like to know if there is any way to get the information of the user who has performed the action during the execution of the listener.

Thanks,

Sincerely yours,

David Cortabarra

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
https://lists.opencms.org/mailman/listinfo/opencms-dev