Oct 22, 2009
I'm wondering if there's a way to dump all of the values of $this->session->userdata() I'm working within Facebook, and have a login page, and once that's successful I want to pass around the UID of the current user, and I thought this would work well. I currently have the uid set as follows:
View 2 Replies
And the result is an inscrutable: this is the preferences form 858f500e167e359edc1942a96f3bac35 So it totally skips over the middle echo containing the uid. Am I not setting this correctly? Is there a way to dump all values of the session array to see what's getting through? UPDATE: I have run var_dump($this->session->userdata) on each the raw website and through Facebook.
On the website it exposes all set values in an array containing 5 values (session_id, IP, User_agent, last_activity, and uid). Within the Facebook chrome however, it only shows the 4 values set by CodeIgniter. I've heard cookies can only be 4k and that encryption could be a problem. Could FB be filling up cookies with its own encrypted (read:larger) data? UPDATE 2 When I comment out the redirect, and just have:
It dutifully returns :test_1234_test: within Facebook. So somewhere during the redirect it's losing this part of the array (but not the whole array). Is it possibly just creating a new session on the redirect page? So that's why it only has the four "stock" variables? If this is the case, I'll need to research how it creates the sessions, and if Facebook clears cookies I suppose. UPDATE 3 So I've turned to using a DB to store session information instead of cookies, thinking FB was either stripping them or colliding with them. I currently have the app set up to
What occurs in the DB is this: So it creates one good record, with the user data, then immediately upon the redirect creates a new session without recognizing the prior one. Can someone explain where the CI framework checks to see if it has a prior session existing? The user manual explains it as "magic" basically.