includes/sessions.php
changeset 203 8e2fffc5c622
parent 188 b4aaca42c8a4
child 204 473cc747022a
child 207 861807631f70
child 246 c9fd175289aa
equal deleted inserted replaced
202:88d7a7c2743c 203: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