On Jan 25, 2008 10:57 AM, red <[EMAIL PROTECTED]> wrote:
> function beforeFilter() {
> $admin = Configure::read('Routing.admin');
>
> $this->Auth->userModel = 'User';
> $this->Auth->fields = array('username' => 'login', 'password'
> =>
> 'password');
>
> $this->Auth->loginAction = array('controller' => 'users',
> 'action'
> => 'login', $admin => false);
> $this->Auth->loginRedirect = array('controller' =>
> 'customers',
> 'action' => 'admin_index');
> $this->Auth->logoutRedirect = '/';
> $this->Auth->loginError = "Sorry, wrong login or password.";
>
> $this->Auth->authorize = 'controller';
> }
>
I believe that you've defined the loginRedirect and loginAction incorrectly
$this->Auth->loginAction = array('controller' => 'users', 'action' =>
'login', 'admin' => false);
$this->Auth->loginRedirect = array('controller' => 'customers',
'action' => 'index', 'admin' => true);
Try that and I hope it helps.
--
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---