[eluser]Maglok[/eluser]
This is something that has been happening in some of my apps, specifically now it is a crucial thing.
I have a form, I create an account and login that person in on submit, then reload the page like so (sketchy):
Code:
function index()
form
if valid {
register
login
}
$this->load->view('template/pona', $data);
My sessions are set up like this:
Code:
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;
I made sure to echo my $data array to see what the state of my login was.
The problem: The first time I get back on the page, it doesn't register as logged in. If I hit F5, I suddenly get the variable in the session.
What. Gives.

I have this more often when submitting data to the same page as it was submitted from.