From: Brion Vibber Date: Fri, 12 Feb 2010 23:24:15 +0000 (-0800) Subject: Session fix for PHP 5.3 configurations where cookies are excluded from $_REQUEST... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=38f42d56bc5f2871d69d1df066a1f1d76e7cbc68;p=quix0rs-gnu-social.git Session fix for PHP 5.3 configurations where cookies are excluded from $_REQUEST via request_order in php.ini (Fedora 12, MacPorts known to be affected) --- diff --git a/lib/util.php b/lib/util.php index a07fe49e33..209dc2254e 100644 --- a/lib/util.php +++ b/lib/util.php @@ -367,7 +367,8 @@ function common_current_user() if ($_cur === false) { - if (isset($_REQUEST[session_name()]) || (isset($_SESSION['userid']) && $_SESSION['userid'])) { + if (isset($_COOKIE[session_name()]) || isset($_GET[session_name()]) + || (isset($_SESSION['userid']) && $_SESSION['userid'])) { common_ensure_session(); $id = isset($_SESSION['userid']) ? $_SESSION['userid'] : false; if ($id) {