7 * @link https://www.open-emr.org
8 * @author Cassian LUP <cassi.lup@gmail.com>
9 * @author Jerry Padgett <sjpadgett@gmail.com>
10 * @author Brady Miller <brady.g.miller@gmail.com>
11 * @copyright Copyright (c) 2011 Cassian LUP <cassi.lup@gmail.com>
12 * @copyright Copyright (c) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
13 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
14 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
17 require_once("verify_session.php");
19 require_once(dirname(__FILE__
) . "/lib/appsql.class.php");
21 $logit = new ApplicationTable();
22 $logit->portalLog('logout', $_SESSION['pid'], ($_SESSION['portal_username'] . ': ' . $_SESSION['ptName'] . ':success'));
24 //log out by killing the session
25 require_once(dirname(__FILE__
) . "/../src/Common/Session/SessionUtil.php");
26 OpenEMR\Common\Session\SessionUtil
::portalSessionCookieDestroy();
28 //redirect to pretty login/logout page
29 // $landingpage is defined in above verify_session.php script
30 header('Location: ' . $landingpage . '&logout');