aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/policy/public/session/logout-pre.php
blob: 013be18c7550946a1b1faf3360046fbac3e55ca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

    if (_RIGHTS_OK !== true) die();

    require('include/share/session/close.php');

    closeSession();
    closeOldAndIdleSessions();
    if (defined('_ALLOW_SULIX_SSO') && _ALLOW_SULIX_SSO===true) {
	session_start();
	unset($_SESSION['portalLoggedPassword']);
	unset($_SESSION['szuloDiakIdOk']);
	session_destroy();
	header('Location: /');
    } else {
//	session_start();
//	unset($_SESSION['szuloDiakIdOk']);
//	session_destroy();
	session_start();
	session_unset();
	session_destroy();
	session_write_close();
	setcookie(session_name(),'',0,'/');
	setcookie($sessionID,'',0,'/');
	session_regenerate_id(true);
	header('Location: index.php');
    }

?>