<?php
include '../env.php';
require_once(LIB.'common.inc.php');
require_once(LIB.'User.class.php');

if (ENABLE_ACTION_LOG) {
	require_once(LIB.'Action.class.php');
	$action = new Action(@$_SESSION['user']['id']);
	$action->logout(session_id());
}

$userObj = new User();
$userObj->clear();
if (! empty($_GET['noajax'])) {
	header('Locatin: '.BASE_URL);
	die;
}
echo json_encode(TRUE);
?>