I've tried - it's not problem with redirecting :(
It looks like this:
1. I'm entering /admin/customers/index
2. It redirects me to /users/login, I'm entering data and click Login
3. I'm still on the /users/login :(
4. When I set $this->Auth->autoRedirect = false; I can see this debug
with affected rows = 1
5. But when I try to get any actions it still redirect's me to the
login page... Damn.
On 25 Sty, 17:05, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---