]> git.datanom.net - webcal.git/blob - logout.php
Initial upload
[webcal.git] / logout.php
1 <?php
2 /* $Id$ */
3 require_once 'config.inc.php';
4 require_once 'authenticate.php';
5 require_once 'helper.php';
6
7 $root = WEB_ROOT;
8
9 /* $_SESSION['caldav_server']->save(); */
10 if (isset($_SESSION['authenticate']) && is_object($_SESSION['authenticate']))
11 $_SESSION['authenticate']->logout();
12
13 setcookie('WEBCAL_EXPIRE', '', time()-3600, $_SESSION['WEB_ROOT']);
14
15 // Unset all of the session variables.
16 $_SESSION = array();
17
18 if (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.
27 session_destroy();
28 session_write_close();
29 session_unset();
30
31 header("Location: " . getServerUrl($root) . "/index.php");
32 exit;
33 ?>
This page took 0.059638 seconds and 6 git commands to generate.