Monday, January 5, 2009

Auth Redirect And Routes

Hello All,

I am trying to set up auth redirect. i.e the user will be redirected to login screen if he accesses a page which can't be accessed without the username/password. After the user authenticates, I try to redirect the user back to the page which he was accessing using $this->redirect($this->Auth->referer());

Though the user is redirected to the proper page but my custom Routes break when such a redirection happens. Here is my auth setup.

           $this->Auth->actionPath = null;
           $this->Auth->loginAction = array('controller' => 'invites', 'action' => 'index');
           $this->Auth->loginRedirect = array('controller' => 'entities', 'action' => 'index');
           $this->Auth->logoutRedirect = null;
    
Please help on how to go about fixing this.
--
Thanks & Regards,
Novice.

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

No comments: