couple minor fixes in facilities
[openemr.git] / patients / verify_session.php
blob49cbd7154f2056d3ba8b8a70bd6a490c5d713ac2
1 <?php
2 // Copyright (C) 2011 Cassian LUP <cassi.lup@gmail.com>
3 //
4 // Moved out of individual get_* portal functions for re-use by
5 // Kevin Yeh (kevin.y@integralemr.com) May 2013
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
14 // All of the common intialization steps for the get_* patient portal functions are now in this single include.
16 //continue session
17 session_start();
19 //landing page definition -- where to go if something goes wrong
20 $landingpage = "index.php?site=".$_SESSION['site_id'];
23 // kick out if patient not authenticated
24 if (isset($_SESSION['pid']) && isset($_SESSION['patient_portal_onsite'])) {
25 $pid = $_SESSION['pid'];
26 } else {
27 session_destroy();
28 header('Location: '.$landingpage.'&w');
29 exit;
34 $ignoreAuth=true; // ignore the standard authentication for a regular OpenEMR user
35 include_once('../interface/globals.php');