Using SWFUpload + Sessions + upload class, how I did it. |
[eluser]pistolPete[/eluser]
Use the built-in logging class: http://ellislab.com/codeigniter/user-gui...rrors.html
[eluser]CollinsSolutions[/eluser]
thanks, i have it all working except i can no longer get the user_id from $this->dx_auth->get_user_id() but i will work on that
[eluser]CollinsSolutions[/eluser]
got it all working, thanks for your help.
[eluser]defunct[/eluser]
[quote author="CollinsSolutions" date="1236910804"]got it all working, thanks for your help.[/quote] How please? I am trying to get swfupload to work with dx_auth. What did you do exactly?
[eluser]CollinsSolutions[/eluser]
Code: $user_id = $this->uri->segment(3); Code: var swfu;
[eluser]defunct[/eluser]
Thank you for posting that, however my problem is more checking if a user is logged in at the top of my controller: Code: <?php I can't seem to pass the session id properly from the flash to ensure the user is logged in. If I remove my if statement above, it works fine of course and posts. Any ideas?
[eluser]pistolPete[/eluser]
@defunct: What session library do you use? If it's CI session, have a look at http://ellislab.com/forums/viewreply/536121/.
[eluser]CollinsSolutions[/eluser]
Code: post_params: {"PHPSESSID" : "<?=$this->session->userdata('session_id')?>"}, also make sure you have Code: $this->load->library('session');
[eluser]defunct[/eluser]
I am using dx_auth, which seems to use ci sessions, but it stores them in the database. It autoloads ci's session library as well in their class. The problem is I have the check on the entire controller, (files) but I'm posting to /files/do_upload/ on my controller. I need some way to pass the session to the construct (using post or get) and passing that to dx_auth somehow...I'm fairly new to CI so not 100% sure how sessions are handled, it is surely cookie based though. The instructions at the top of this (editing Session.php) are outdated it seems as well, the code isn't the same, nor are the line numbers. I do have the proper session ID on my form page, using the technique above, but whenever I post a new flash session is added to the database and just adding it to session_id() in my construct doesn't seem to work correctly with dx_auth. So I'm a bit stuck at the moment.
[eluser]CollinsSolutions[/eluser]
you can set the session id by getting the PHPSESSID post param. |
Welcome Guest, Not a member yet? Register Sign In |