loginRedirect is NOT the address you will be send after login. It's
the address wheere user willbe redirected if he requested protected
resource.


Do a manual redirect() in login() action.


On 19 май, 18:33, lakers fan <lakersfa...@msn.com> wrote:
> Hello,
>
>     I have userid and password fields and a login button. When I press login 
> button, if the userid and password are correct I want the page redirected to 
> my accounts page.
>
> So in app_controller.php, in beforeFilter() I have the following code.
>
> $this->Auth->loginRedirect = '/users/myaccount';
>
> In my users_controller, in login() I have the following code
>
>   if($this->Auth->user())
>   {
>    echo "inside the if login()";
>    $this->set('isLoggedin', true);
>    $this->redirect($this->Auth->loginRedirect);
>   }
>   else
>   {
>    echo "Inside Else loop";
>   }
>
> But the page is not redirected to myaccount page.. Any pointers??
>
> Thanks,
>
> Bharani
>
> _________________________________________________________________
> Insert movie times and more without leaving 
> Hotmail(R).http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM...
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to