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

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

$sessions = new \Sessions;
$sessions->configure();
$sessions->extend_session();

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();
		}
	}
}