Hey,

Although Milmar gave you most of what you need, i've written a small
blog post about how I did it all, when I first tackled the Auth
component: 
http://westsworld.dk/posts/view/cakephp-and-the-_in_-famous-auth-component

Still, i'd say, that you should leave the login() function blank. Cake
should then be able to do it's magic. I think it doesn't override your
method, if you've implemented it. (Haven't checked this though)

Hope you can use it.

On Dec 9, 6:22 am, gearvOsh <[EMAIL PROTECTED]> wrote:
> Here is my AppController and my UsersController:
>
> class AppController extends Controller {
>
>         var $components = array('Auth');
>
>         function beforeFilter() {
>                 Security::setHash('md5');
>
>                 // Authenticate
>                 $this->Auth->sessionKey = 'User';
>                 //$this->Auth->authorize = 'controller';
>                 $this->Auth->loginAction = array('controller' => 'users', 
> 'action'
> => 'login');
>                 $this->Auth->loginRedirect = $referer;
>                 $this->Auth->logoutRedirect = array('controller' => 'site', 
> 'action'
> => 'index', 'home');
>         }
>
> }
>
> class UsersController extends AppController {
>
>         function index() {
>                 $this->redirect(array('controller' => 'users', 'action' =>
> 'login'));
>         }
>
>         /**
>          * Login
>          */
>         function login() {
>                 $this->pageTitle = 'Login - GameSync';
>                 $this->set('activeTab', 'login');
>         }
>
>         /**
>          * Logout
>          */
>         function logout() {
>                 $this->redirect($this->Auth->logout());
>         }
>
> }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to