Welcome Guest, Not a member yet? Register   Sign In
Problem with storing objects in session
#1

[eluser]felix_[/eluser]
Hey,
ive got problems with storing object in my session Sad

i already found that several people hav this problem and i already replaced my Session.php with this one here

but after my redirect to another controller my session lost all the data i put in =/

whats wrong with it?
#2

[eluser]Roy MJ[/eluser]
You've gotta put some script so that ppl can see what your doing wrong...
#3

[eluser]felix_[/eluser]
Code:
$sessionData = array(
                    'loggedIn' => true,
                    'user' => $users[0]
                        );
                $this->session->set_userdata($sessionData);
redirect('user/welcome');

when i do a var_export before the redirect everything is fine

but after the redirect there is nothing of my data available in the session... not even the boolean value

Code:
function welcome() { var_export($this->session->userdata('user'); }

hope this can help you to help me Smile
#4

[eluser]Kobus M[/eluser]
I have the exact same problem, using CI 1.7.2.

My code is similar to this code posted. Session data is there before using redirect, gone after redirect.

Kobus




Theme © iAndrew 2016 - Forum software by © MyBB