Welcome Guest, Not a member yet? Register   Sign In
Help with SESSION.
#2

[eluser]Cristian Gilè[/eluser]
If you want to check if the user is logged in, you have to use userdata not set_userdata:

Code:
if(!$this->session->userdata('loggedin'))
{
    $this->session->set_flashdata('message', 'You must login');
    redirect('path/to/login/controller');
}


Messages In This Thread
Help with SESSION. - by El Forum - 06-04-2012, 08:21 AM
Help with SESSION. - by El Forum - 06-04-2012, 08:37 AM
Help with SESSION. - by El Forum - 06-04-2012, 09:42 AM
Help with SESSION. - by El Forum - 06-04-2012, 10:04 AM
Help with SESSION. - by El Forum - 06-04-2012, 10:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB