/ Published in: PHP
Another common use of Auth component variables is to allow access to certain methods without the user being logged in (by default Auth restricts access to every action except the login and logout methods).
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//For example if we want to allow all users access to the index and view methods ( but not //any other), we would do the following (inside a controller) function beforeFilter() { $this->Auth->allow('index','view'); }
URL: http://book.cakephp.org/view/1251/Setting-Auth-Component-Variables