Thanks for the response Cricket, I have dumped my codes below. Please
assist me. Regards.

My AppController::beforeFilter()

function beforeFilter(){
  $this->Auth->fields = array('username' => 'username', 'password' =>
'passkey');
  $this->Auth->allow($this->allowedActions);
  $this->Auth->authorize = 'controller';
  $this->Auth->loginAction = array('controller' => 'users', 'action'
=> 'login');
  $this->Auth->loginRedirect = array('controller' => 'pages', 'action'
=> 'display', 'home');
  $this->Auth->logoutRedirect = '/';
  $this->Auth->autoRedirect = false;
}

My UsersController::login()

if ($this->Auth->user()) {
    if (!empty($this->data)) {
      $this->Session->setFlash('You have been logged in
successfully');
      $this->_postLoginOperations(); //This method redirects the user
based on role
      $this->data = array();
    }
    $this->redirect($this->Auth->redirect());
}



On Apr 16, 11:55 am, cricket <[email protected]> wrote:
> On Apr 16, 1:40 am, "Prof. No Time" <[email protected]>
> wrote:
>
> > In the cook book, we are told that theauthcomponentuses the session
> >componenttoremembertheurlthe user intended to visit and hence
> > when authenticated, automatically takes the user there. However, this
> > DOES NOT WORK for me (cake 1.2.5). What could be the problem?
>
> What does your AppController::beforeFilter() look like? Specifically,
> do you have $this->Auth->autoRedirect = false? Do you have any code in
> UsersController::login() or is it empty?
>
> Check out the newCakePHPQuestions sitehttp://cakeqs.organd help others with 
> theirCakePHPrelated questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to