Copyright bump (#4832)
[openemr.git] / portal / verify_session.php
blob5492b54a064f9aa3d914532c70f8531dd1c421e4
1 <?php
3 /**
4 * portal/verify_session.php
6 * @package OpenEMR
7 * @link http://www.open-emr.org
8 * @author Cassian LUP <cassi.lup@gmail.com>
9 * @author Kevin Yeh <kevin.y@integralemr.com>
10 * @author Jerry Padgett <sjpadgett@gmail.com>
11 * @author Brady Miller <brady.g.miller@gmail.com>
12 * @copyright Copyright (c) 2011 Cassian LUP <cassi.lup@gmail.com>
13 * @copyright Copyright (c) 2013 Kevin Yeh <kevin.y@integralemr.com>
14 * @copyright Copyright (c) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
15 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
16 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
19 // All of the common intialization steps for the get_* patient portal functions are now in this single include.
23 //continue session
24 // Will start the (patient) portal OpenEMR session/cookie.
25 require_once(__DIR__ . "/../src/Common/Session/SessionUtil.php");
26 OpenEMR\Common\Session\SessionUtil::portalSessionStart();
28 //landing page definition -- where to go if something goes wrong
29 $landingpage = "index.php?site=" . urlencode($_SESSION['site_id'] ?? null);
32 // kick out if patient not authenticated
33 if (isset($_SESSION['pid']) && isset($_SESSION['patient_portal_onsite_two'])) {
34 $pid = $_SESSION['pid'];
35 } else {
36 OpenEMR\Common\Session\SessionUtil::portalSessionCookieDestroy();
37 header('Location: ' . $landingpage . '&w');
38 exit;
43 $ignoreAuth_onsite_portal = true; // ignore the standard authentication for a regular OpenEMR user
44 require_once(dirname(__file__) . './../interface/globals.php');