I find it difficult to understand how the CakePHP administration system works.
- If all the controllers that have an action requiring a login include AuthComponent or only the one who processes the login / logout?
Let's say I want to protect the action of adding a controller. First I create admin_add() in the controller, and then in the beforeFilter() method beforeFilter() check if the $this->Session->check('Auth.User') redirection is set based on this? Turns out it was better to just manage this with $this->Auth->allow()What is the easiest way to get back to the URL that the user was trying to access? Is there a better way than setting a session variable? Turns it off automatically :)
If someone has a good tutorial, I would love to read it :) I already read this tutorial, but I found it a little basic, and CakePHP documents are not that great on this topic.
source share