[eluser]sb05[/eluser]
This was originally in the Session.php.
Code:
function sess_create()
{
$sessid = '';
while (strlen($sessid) < 32)
{
$sessid .= mt_rand(0, mt_getrandmax());
}
// To make the session ID even more secure we'll combine it with the user's IP
$sessid .= $this->CI->input->ip_address();
$this->userdata = array(
'session_id' => md5(uniqid($sessid, TRUE)),
'ip_address' => $this->CI->input->ip_address(),
'user_agent' => substr($this->CI->input->user_agent(), 0, 50),
'last_activity' => $this->now
);
Only thing i added where the lines:
Code:
if (isset($this->userdata['id'])) {
$db_data['id'] = $this->userdata['id'];
} else {
$db_data['id'] = '';
}
But it don't save the id of the user that is logging in.
I'm using the dx_auth library if that matters.
Tnx