While this affects me trying to use the CookieComponent in the
controller->beforeFilter function this appears to me to affect any
component that needs to have it's startup function called before it's
used and you need to access the component in beforeFilter.

I am attempting to check for a cookie in the beforeFilter function of
the controller using the CookieComponent. Doing this based on previous
posts I've read for keeping a user logged in between visits.

What I have found is that controller->beforeFilter is called before
the components get their startup() functions called so the
CookieComponent doesn't get it's values setup correctly to access the
correct cookies.

You can see this code in dispatcher.php line 379 (from the 5-29
nightly build)

My first thought was to move the controller->beforeFilter call to
after the components loop but since I really don't know what that
could potentially break I thought better of it.

Maybe there's a better way to do what I'm attempting but it seems to
me that you'd need full access to your components inside of
beforeFilter.

I did see ticket #2667 that is pertaining to the same thing as this.
My thought though is that having the function called startup() makes
me things it needs to be called before the component is used so maybe
that ticket isn't the best solution.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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