git-interface: Add test suite and basic tests
[aur.git] / web / html / logout.php
blob5e8e8f430b8dd16b42ae8903eb7e5205786445da
1 <?php
3 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
5 include_once("aur.inc.php"); # access AUR common functions
6 include_once("acctfuncs.inc.php"); # access AUR common functions
9 # if they've got a cookie, log them out - need to do this before
10 # sending any HTML output.
12 if (isset($_COOKIE["AURSID"])) {
13 delete_session_id($_COOKIE["AURSID"]);
14 # setting expiration to 1 means '1 second after midnight January 1, 1970'
15 setcookie("AURSID", "", 1, "/", null, !empty($_SERVER['HTTPS']), true);
16 unset($_COOKIE['AURSID']);
17 clear_expired_sessions();
20 header('Location: /');