]> git.mxchange.org Git - mailer.git/blobdiff - inc/session.php
More queries now depends on UNIX_TIMESTAMP() SQL function, wrong index in autopurge...
[mailer.git] / inc / session.php
index af8eb7c050f9aaec5fe282c789c8fdcf6c0cd142..2c7ab4488d4d59ca92eef7bf279a9ccf2469027b 100644 (file)
@@ -32,7 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -47,6 +47,7 @@ if (($VIEW == 1) && ($_SERVER['PHP_SELF'])) return;
 
 // Start the session
 @session_start();
+global $PHPSESSID;
 $PHPSESSID = @session_id();
 
 // Store language code in cookie
@@ -91,7 +92,7 @@ if (isset($_SESSION['userid'])) {
        $GLOBALS['userid'] = bigintval($_SESSION['userid']);
 
        // Is it valid?
-       if (!IS_LOGGED_IN()) {
+       if (!IS_MEMBER()) {
                // Then destroy the user id
                destroy_user_session();
        } // END - if