I'm not sure if I'm doing something wrong or what, but I'm getting
strange before with the beforeFilter method.

I have the following in my beforeFilter method

function beforeFilter()
{
    parent::beforeFilter();
    $this->Auth->allow('success');

    $this->basket = $this->Session->read('Basket');

    switch ($this->action) {
        case "add_system":
        case "add_fixtures":
        case "add_harware":
        case "add_other":
        case "submit_quote":
            if (!$this->Session->check('Basket.Quote.wall_center')) {
                $this->redirect('/quotes/setup/');
            }
        break;
    }
}

And the following actions relevant to this issue:

function submit_quote()
{
   $this->Session->del('Basket');
   $this->Log('I was here');
   $this->redirect('/quotes/success/');
}

function success ()
{
   // nothing here
}


The session object has 'Basket.Quote.wall_center' defined. When I
access submit_quote, the basket is cleared and it should redirect to
'success' without problems, but it instead redirects back to setup().
The code in beforeFilter() is being executed after submit_quote is
executed. How can this be? I know that the session value exists
because submit_quote does execute (confirmed by checking log for "I
was here")... but it seems that rather than redirecting to success(),
it redirects to setup().. which could only mean that the code in
beforeFilter() is being executed after submit_quote()
--~--~---------~--~----~------------~-------~--~----~
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