]> git.mxchange.org Git - mailer.git/blobdiff - inc/session.php
Should now work again, missed to fill out mask
[mailer.git] / inc / session.php
index 591cb1c4eea7cd076606943e592528ff1ecc8ae8..a90234a9c3c28796cac13d81cb8d1a38d4b26869 100644 (file)
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
-// Set session save path if set
-if (getConfig('session_save_path') != '') {
-       // Please make sure this valid!
-       session_save_path(getConfig('session_save_path'));
+// Is ext-sql_patches there and newer?
+if (isExtensionInstalledAndNewer('sql_patches', '0.5.3')) {
+       // Set session save path if set
+       if (getConfig('session_save_path') != '') {
+               // Please make sure this valid!
+               session_save_path(getConfig('session_save_path'));
+       } // END - if
 } // END - if
 
+// Is a session id there?
 if (session_id() == '') {
        // Start the session
        session_start();
@@ -61,15 +65,12 @@ determineReferalId();
 // Transfer userid from session and validate it
 if (isSessionVariableSet('userid')) {
        // Get it secured from session
-       setUserId(getSession('userid'));
+       setMemberId(getSession('userid'));
 
        // Is it valid?
        if (!isMember()) {
                // Then destroy the user id
-               destroyUserSession();
-
-               // Kill userid
-               setUserId(0);
+               destroyMemberSession();
        } // END - if
 } // END - if