[eluser]steel_slasher[/eluser]
ok basically i modded the session lib so that it would check if the email and password in the cookie are valid so i added a few lines which have a SQL query which checks for the information given then checks them in an if statement heres the code:
Code:
if(isset($session['email'])){
$query = $this->CI->db->query("SELECT * FROM `cookies` WHERE `email` = '{$session['email']}' AND `password` = '{$session['password']}'");
foreach ($query->result() as $row)
{
$email=$row->email;
$password=$row->password;
}
if($email!==$session['email']){
$this->sess_destroy();
return FALSE;
}
if($password!==$session['password']){
$this->sess_destroy();
return FALSE;
}
}
i also made another mod where the session lib checks the cookie for a "forget" value and then checks if the cookie has been expired after a given time in a custom config value
Code:
$expiration = $this->CI->config->item('sess_expiration');
if(isset($session['forget']))
$expiration = $this->CI->config->item('sess_expiration_forget');
if (is_numeric($expiration))
{
if ($expiration > 0)
{
$this->sess_length = $this->CI->config->item('sess_expiration');
}
else
{
$this->sess_length = (60*60*24*365*2);
}
}
the real problem is that no matter what the email and password check fails and the forget value is never set because the email and password check fails. I NEED HELP!!!!!!!!