Welcome Guest, Not a member yet? Register   Sign In
Using flashdata before userdata
#1

[eluser]rossmurphy[/eluser]
I have a login page that sets userdata once the user has logged in successfuly like this:

Code:
if (user_authenticated())
{
    $session_data['auth'] = TRUE;
    $session_data['userid'] = FGT01932434;
    
    $this->session->set_userdata($session_data);
}

I have found though, that if I use 'set_flashdata()' before I use set_userdata().. and then redirect(), the user data is never set. I thought it may be a problem with the redirect, but no.. if I do not set the flash data, everything works as expected.

I am using this to store form data before setting the userdata:

Code:
$this->session->set_flashdata('form_data', '$formdata');

Anyone come across this issue?


Messages In This Thread
Using flashdata before userdata - by El Forum - 08-15-2010, 02:42 PM
Using flashdata before userdata - by El Forum - 08-15-2010, 03:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB