forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logout.php
23 lines (21 loc) · 907 Bytes
/
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
<?php
/**
* Logout script.
*
* @package OpenEMR
* @link http:https://www.open-emr.org
* @author Tony McCormick <[email protected]>
* @author Kevin Yeh <[email protected]>
* @author Brady Miller <[email protected]>
* @copyright Copyright (c) 2018 Brady Miller <[email protected]>
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*/
// Set the GET auth parameter to logout.
// This parameter is then captured in the auth.inc script (which is included in globals.php script) and does the following:
// 1. Logs out user
// 2. Closes the php session
// 3. Redirects user to the login screen (maintains the site id)
$_GET['auth'] = "logout";
// Set $sessionAllowWrite to true to prevent session concurrency issues during authorization/logout related code
$sessionAllowWrite = true;
require_once("globals.php");