forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logout.php
30 lines (25 loc) · 1.11 KB
/
logout.php
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
30
<?php
/**
* portal/logout.php
*
* @package OpenEMR
* @link https://www.open-emr.org
* @author Cassian LUP <[email protected]>
* @author Jerry Padgett <[email protected]>
* @author Brady Miller <[email protected]>
* @copyright Copyright (c) 2011 Cassian LUP <[email protected]>
* @copyright Copyright (c) 2016-2017 Jerry Padgett <[email protected]>
* @copyright Copyright (c) 2019 Brady Miller <[email protected]>
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*/
require_once("verify_session.php");
require_once(dirname(__FILE__)."/lib/appsql.class.php");
$logit = new ApplicationTable();
$logit->portalLog('logout', $_SESSION['pid'], ($_SESSION['portal_username'].': '.$_SESSION['ptName'].':success'));
//log out by killing the session
require_once(dirname(__FILE__) . "/../src/Common/Session/SessionUtil.php");
OpenEMR\Common\Session\SessionUtil::portalSessionCookieDestroy();
//redirect to pretty login/logout page
// $landingpage is defined in above verify_session.php script
header('Location: '.$landingpage.'&logout');
//