Hi all, I'm having teh following problem:

The application I'm writing serves three distinct user types, each
having their own separated workspace.

this has been implemented by a custom redirect routine that fires
after a sucessful login (autoRedirect is set to false in the Auth
component.)

now, The users can receive mails with a link to a controller / action
that is shared wetween the three usezr roles.

currently when someone clicks on the link in the mail, tha app
redirects to the loginscreen, which is should do. but due to the
custom redirect routines, the redirect is not going to the link in the
mail.

I tried to solve this by the following code in app_controller:

function beforeFilter(){
    if($this->name == 'confirmations'){
      $this->Auth->autoRedirect = true;
      //$this->Auth->allow('confirm');
      $this->Auth->loginAction = array('admin' => false, 'controller'
=> 'confirmations', 'action' => 'login');
      $this->Auth->authorize = 'controller';
    }
    else{
      $this->Auth->autoRedirect = false;
      $this->Auth->allow('display', 'index', 'register',
'registrationcomplete', 'returnDetails', 'Quicksearch');
      $this->Auth->authorize = 'controller';

    }
  }

and added a separate login view in the confirmations folder.

but it is not behaving as expected.
after clicking the link in the email, I get redirected nicely to the
confirmations / login controller action pair.
but after a login, no redirect is made.

I was wondering if anyone had the same problem before..

I'm using cake v1.2.0.7692 RC3

many, many thanks for any insight..



--~--~---------~--~----~------------~-------~--~----~
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