session->userdata empty with swf upload... |
[eluser]sikko[/eluser]
Hi all, I'm using swf upload to allow users to upload avatars. The swf is calling a url index.php/uploader/upload and is uploading the image. Now thigs get more complicated: I want to check whether or not the user is logged in. For that, I need to call Code: $this->session->userdata('logged') So I called the index.php/uploader/upload url using my browser, and var_dumped the $this variable. The interesting part is userdata: Code: ["userdata"]=> I did the same var_dump with the swf call: Code: ["userdata"]=> Different session_id, different user_agent, and NO id_user, username etc... So this is why I can not check if user is logged, and cannot update avatars... Any ideas ? I also tried using php native sessions $_SESSION, but exactly the same.... Thanks in advance for ya help !
[eluser]InsiteFX[/eluser]
You need to search the Forums, this has been answered here before. InsiteFX
[eluser]sikko[/eluser]
Hi, Thanks for your answer, Not sure if this thread http://ellislab.com/forums/viewthread/191009/P0/ is what you are talking about, but it doesn't seem to solve my problem... I've created the table: Code: CREATE TABLE IF NOT EXISTS `ci_sessions` (
[eluser]sikko[/eluser]
I thought that Code: $config['sess_match_useragent'] = FALSE;
[eluser]InsiteFX[/eluser]
The session table user_agent field should be varchar(120) they have changed it! Not sure if that is the thread, the one I read had the problem being with sessions. InsiteFX
[eluser]sikko[/eluser]
Alright I think I found the one: http://ellislab.com/forums/viewthread/150550/. I'm gonna give it a try.
[eluser]InsiteFX[/eluser]
Sorry but I was not sure were I saw it at. InsiteFX
[eluser]sikko[/eluser]
No worries ![]() I just read a response from fchristant : http://ellislab.com/forums/viewreply/809354/ Saying that this way is quiet unsecure, and I kinda think the same. What do you guys think ? I'll try to implement what he describes, it's a shame that he didn't share his code. |
Welcome Guest, Not a member yet? Register Sign In |