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Ā®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009
--~--~---------~--~----~------------~-------~--~----~
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