]> git.datanom.net - webcal.git/blame - logout.php
Initial upload
[webcal.git] / logout.php
CommitLineData
a5eae6b7
MR
1<?php
2/* $Id$ */
3require_once 'config.inc.php';
4require_once 'authenticate.php';
5require_once 'helper.php';
6
7$root = WEB_ROOT;
8
9/* $_SESSION['caldav_server']->save(); */
10if (isset($_SESSION['authenticate']) && is_object($_SESSION['authenticate']))
11 $_SESSION['authenticate']->logout();
12
13setcookie('WEBCAL_EXPIRE', '', time()-3600, $_SESSION['WEB_ROOT']);
14
15// Unset all of the session variables.
16$_SESSION = array();
17
18if (ini_get("session.use_cookies")) {
19 $params = session_get_cookie_params();
20 setcookie(session_name(), '', time() - 42000,
21 $params["path"], $params["domain"],
22 $params["secure"], $params["httponly"]
23 );
24}
25
26// Finally, destroy the session.
27session_destroy();
28session_write_close();
29session_unset();
30
31header("Location: " . getServerUrl($root) . "/index.php");
32exit;
33?>
This page took 0.029911 seconds and 5 git commands to generate.