Fix disable admin signature for new templates.
[openemr.git] / portal / verify_session.php
blob519127b73794dc9712422e3d589cfb2d5dd2bdf2
1 <?php
2 /**
4 * Copyright (C) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
5 * Copyright (C) 2013 Kevin Yeh <kevin.y@integralemr.com>
6 * Copyright (C) 2011 Cassian LUP <cassi.lup@gmail.com>
8 * LICENSE: This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 3
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
19 * @package OpenEMR
20 * @author Cassian LUP <cassi.lup@gmail.com>
21 * @author Kevin Yeh <kevin.y@integralemr.com>
22 * @author Jerry Padgett <sjpadgett@gmail.com>
23 * @link http://www.open-emr.org
25 * Moved out of individual get_* portal functions for re-use by
26 * Kevin Yeh (kevin.y@integralemr.com) May 2013
30 // All of the common intialization steps for the get_* patient portal functions are now in this single include.
34 //continue session
35 session_start();
37 //landing page definition -- where to go if something goes wrong
38 $landingpage = "index.php?site=".$_SESSION['site_id'];
41 // kick out if patient not authenticated
42 if (isset($_SESSION['pid']) && isset($_SESSION['patient_portal_onsite_two'])) {
43 $pid = $_SESSION['pid'];
44 } else {
45 session_destroy();
46 header('Location: '.$landingpage.'&w');
47 exit;
52 $ignoreAuth=true; // ignore the standard authentication for a regular OpenEMR user
53 require_once(dirname(__file__) . './../interface/globals.php');