Skip to content
Snippets Groups Projects
Commit eab50855 authored by tbrehm's avatar tbrehm
Browse files

Improved session_handler

parent 333866e9
No related branches found
No related tags found
2 merge requests!46Master,!21Master
......@@ -68,8 +68,11 @@ class session {
$this->session_array = array();
}
// Dont write session to DB if session data has not been changed after reading it.
// Dont write session_data to DB if session data has not been changed after reading it.
if(isset($this->session_array['session_data']) && $this->session_array['session_data'] != '' && $this->session_array['session_data'] == $session_data) {
$session_id = $this->db->quote($session_id);
$last_updated = date('Y-m-d H:i:s');
$this->db->query("UPDATE sys_session SET last_updated = '$last_updated' WHERE session_id = '$session_id'");
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment