I can't figure out how to get the current user in PHP. I see a function called getUser in the Espo core files, but I my code is running in a hook, so I need to somehow use dependency injection to get access to the current user object. How can I do this?
How to get the current user in PHP
Collapse
X
-
You should use ->getId() instead of ->id. I highly recommend using IDE that will highlight deprecation usage as well as other issues.If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.Comment
Comment