Monday, August 31, 2009

change route after authroize users

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: