summaryrefslogtreecommitdiff
path: root/include/sessions.php
blob: cee2702befabfc500865b458df7b7057d3b602bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
namespace Sessions;

require_once 'autoload.php';
require_once 'errorhandler.php';

$sessions = new \Sessions;

if (\Config::get_schema_version() >= 0) {
	session_set_save_handler($sessions);

	if (!defined('NO_SESSION_AUTOSTART')) {
		if (isset($_COOKIE[session_name()])) {
			if (session_status() != PHP_SESSION_ACTIVE)
					session_start();
		}
	}
}