Monday, August 31, 2009

Re: change route after authroize users

i know that but i want change general route '/' so yes your trick
witch redirect working after user did login but after even go to /
load default general route from /

but i'll try user Route::conntect in login() :)

On 31 Sie, 10:32, Aivaras <faifas1...@gmail.com> wrote:
> Hey,
>
> did you take a look at thishttp://book.cakephp.org/view/391/loginAction?
>
> Faifas
>
> On Mon, Aug 31, 2009 at 11:05, andrzejborkow...@gmail.com <
>
>
>
> andrzejborkow...@gmail.com> wrote:
>
> > i want to change default route after login my users, i try like this:
>
> > [/project/app_controller.php]
> > public function beforeFilter() {
> > (...)
> >        if($this->Auth->user()){
> >                Router::connect('/', array('controller' => 'users', 'action'
> > => 'profile'));
> >                Router::promote();
> > }
>
> > but it dont work and still active first default route form route.php..
--~--~---------~--~----~------------~-------~--~----~
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: