Welcome Guest, Not a member yet? Register   Sign In
Login authentication
#2

[eluser]Aken[/eluser]
Nope, that's really about it if you're doing a simple logged in/out.

You can change the way you store userdata if you want - you're saving an array, when you can just set individual items if you want. Just another option - what you're doing is perfectly fine if that's how you want to store/access data.

Code:
$user_data = array('user_id' => sha1(md5($row->id . $ci_encryption_key)), 'is_logged_in' => true);
    
$this->session->set_userdata($user_data);

// Call the logged in setting
$this->session->userdata('logged_in');


Messages In This Thread
Login authentication - by El Forum - 05-09-2012, 09:16 AM
Login authentication - by El Forum - 05-09-2012, 04:47 PM
Login authentication - by El Forum - 05-10-2012, 07:33 AM
Login authentication - by El Forum - 05-10-2012, 07:43 AM
Login authentication - by El Forum - 05-10-2012, 08:24 AM
Login authentication - by El Forum - 05-10-2012, 09:01 AM
Login authentication - by El Forum - 05-10-2012, 09:15 AM
Login authentication - by El Forum - 05-11-2012, 02:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB