We have a simple CakePHP 4 development with CakePHP authentication 2 which works almost fine...
With AuthenticationComponent we can access the logged in User with $this->Authentication->getIdentity() in every Controller;
We want to add the logged-in User into any add/edit request...
Therefore we wrote behavior that works and add´s a string to every add/edit...
But how can we access the AuthenticationComponent in a Models Behavior? I´ve found no way...
Thanks for every hint...