Dashboard User signature change fix.
[openemr.git] / portal / patient / libs / Controller / ProviderController.php
blob51ebce1d0650414474200be23163bbe4c856d092
1 <?php
2 /** @package Openemr::Controller */
4 /**
6 * Copyright (C) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
8 * LICENSE: This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Affero General Public License as
10 * published by the Free Software Foundation, either version 3 of the
11 * License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Affero General Public License for more details.
18 * You should have received a copy of the GNU Affero General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * @package OpenEMR
22 * @author Jerry Padgett <sjpadgett@gmail.com>
23 * @link http://www.open-emr.org
26 /** import supporting libraries */
27 require_once("AppBaseController.php");
29 /**
30 * DefaultController is the entry point to the application
32 * @package Openemr::Controller
33 * @author ClassBuilder
34 * @version 1.0
36 class ProviderController extends AppBaseController
38 /**
39 * Override here for any controller-specific functionality
41 protected function Init()
43 parent::Init();
45 // $this->RequirePermission(SecureApp::$PERMISSION_USER,'SecureApp.LoginForm');
48 /**
49 * Display the home page for the application
51 public function Home()
53 $cpid=$cuser=0;
54 if (isset($_SESSION['authUserID'])) {
55 $cuser = $_SESSION['authUserID'];
56 } else {
57 header("refresh:5;url= ./provider");
58 echo 'Shared session not allowed with Portal!!! <br>Onsite portal is using this session<br>Waiting until Onsite Portal is logged out........';
59 exit;
62 $this->Assign('cpid', $GLOBALS['pid']);
63 $this->Assign('cuser', $cuser);
65 $this->Render();
68 /**
69 * Displayed when an invalid route is specified
71 public function Error404()
73 $this->Render();
76 /**
77 * Display a fatal error message
79 public function ErrorFatal()
81 $this->Render();
84 public function ErrorApi404()
86 $this->RenderErrorJSON('An unknown API endpoint was requested.');