-// Start the session
-session_start();
-
-// Load language system
-LOAD_INC_ONCE("inc/language.php");
-
-// Load extensions here
-LOAD_INC_ONCE("inc/load_extensions.php");
-
-// Determine and set referal id
-DETERMINE_REFID();
-
-// Transfer userid from session and validate it
-if (isSessionVariableSet('userid')) {
- // Get it secured from session
- setUserId(GET_SESSION('userid'));
-
- // Is it valid?
- if (!IS_MEMBER()) {
- // Then destroy the user id
- destroy_user_session();
-
- // Kill userid
- setUserId(0);
+// Is ext-sql_patches there and newer?
+if (isExtensionInstalledAndNewer('sql_patches', '0.5.3')) {
+ // Set session save path if set
+ if ((isConfigEntrySet('session_save_path')) && (getConfig('session_save_path') != '')) {
+ // Please make sure this valid!
+ session_save_path(getConfig('session_save_path'));