How to get current authenticated user in an event listener

As the title says, I’m trying to access the current logged in user in an event listener. I just upgraded to the new Authentication plugin, and I can’t seem to figure out how to do this. There is no request in the event itself (Model.afterSave), nor can I access the AuthenticationComponent from what I can see.

Any help would be greatly appreciated!

Your question seems to be rather similar to the one just asked here: -Accessing Logged in User in Model
Maybe there is something in that which can help?

Thank you! Eventually I used Footprint to do what I wanted.

1 Like