X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fsession.php;h=8d8d5b7cf97d906ad1ce0461d058eb51234e7b47;hp=2c7ab4488d4d59ca92eef7bf279a9ccf2469027b;hb=1a9c4d5736b58e8d1da657ba2ff3da9f0777300c;hpb=963e55ca1ea79e255f235e359cde9f7862191dc5 diff --git a/inc/session.php b/inc/session.php index 2c7ab4488d..8d8d5b7cf9 100644 --- a/inc/session.php +++ b/inc/session.php @@ -1,7 +1,7 @@ 0 -if (!isSessionVariableSet('refid') || (!empty($GLOBALS['refid'])) || ((get_session('refid') == "0") && ($_CONFIG['def_refid'] > 0))) { - // Set cookie - set_session("refid", $GLOBALS['refid']); -} +// Determine and set referal id +determineReferalId(); // Transfer userid from session and validate it -if (isset($_SESSION['userid'])) { +if (isSessionVariableSet('userid')) { // Get it secured from session - $GLOBALS['userid'] = bigintval($_SESSION['userid']); + setMemberId(getSession('userid')); // Is it valid? - if (!IS_MEMBER()) { + if (!isMember()) { // Then destroy the user id - destroy_user_session(); + destroyMemberSession(); } // END - if -} - -// Test session if index.php or modules.php is loaded -if ((basename($_SERVER['PHP_SELF']) == "index.php") || (basename($_SERVER['PHP_SELF']) == "modules.php") || (isBooleanConstantAndTrue('mxchange_installing'))) { - if (count($_SESSION) > 0) { - // Session variables accepted! - define('__COOKIES', true); - } else { - // Cookies rejected! - define('__COOKIES', false); - } -} -//* DEBUG: */ print("
".print_r($_SESSION, true)."
"); +} // END - if -// +// [EOF] ?>