includes/sessions.php
changeset 191 8e2fffc5c622
parent 177 b4aaca42c8a4
child 202 c9fd175289aa
equal deleted inserted replaced
190:88d7a7c2743c 191:8e2fffc5c622
   861     }
   861     }
   862     else
   862     else
   863     {
   863     {
   864       // Stash it in a cookie
   864       // Stash it in a cookie
   865       // For now, make the cookie last forever, we can change this in 1.1.x
   865       // For now, make the cookie last forever, we can change this in 1.1.x
   866       setcookie( 'sid', $session_key, time()+315360000, scriptPath.'/' );
   866       setcookie( 'sid', $session_key, time()+315360000, scriptPath.'/', null, ( isset($_SERVER['HTTPS']) ) );
   867       $_COOKIE['sid'] = $session_key;
   867       $_COOKIE['sid'] = $session_key;
   868     }
   868     }
   869     // $keyhash is stored in the database, this is for compatibility with the older DB structure
   869     // $keyhash is stored in the database, this is for compatibility with the older DB structure
   870     $keyhash = md5($session_key);
   870     $keyhash = md5($session_key);
   871     // Record the user's IP
   871     // Record the user's IP