Hi teum,

I too had a lot of problems trying to get this work using anything
other the standard users controller. I'm using 1.2 and I found that
this works:

In app controller:

<?php
class AppController extends Controller {

        var $helpers = array('javascript');
        var $components = array('Auth');

        function beforeFilter() {
                $this->Auth->userModel = 'Account';
                $this->Auth->loginAction = array('controller' => 'accounts',
'action' => 'login');
                $this->Auth->loginRedirect = array('controller' => 'dashboard',
'action' => 'index');
                $this->Auth->logoutRedirect = array('controller' => 'accounts',
'action' => 'login');
        }

}
?>

That's all. And then be sure to remove all references to Auth in your
other controllers if you want your entire app to be protected. You
don't need to use Auth->allow for login either - that will really
cause problems.

Cheers

--~--~---------~--~----~------------~-------~--~----~
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