PluginProbe
ShiftController Employee Shift Scheduling / 3.2.4
ShiftController Employee Shift Scheduling v3.2.4
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / application / core / MY_Controller.php

MY_Controller.php in ShiftController Employee Shift Scheduling 3.2.4, at application/core/MY_Controller.php

21 lines 552 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 class MY_HC_Controller extends MY_HC_Base_Controller
3 {
4 function __construct()
5 {
6 parent::__construct();
7
8 // if we need to simulate user - in WP shortcut page */
9 $app = HC_App::app();
10 if( isset($GLOBALS['NTS_CONFIG'][$app]['SIMULATE_USER_ID']) ){
11 $acl = HC_App::acl();
12 $simulate_id = $GLOBALS['NTS_CONFIG'][$app]['SIMULATE_USER_ID'];
13 $auth_user = $this->auth->user();
14 $acl_user = $this->auth->user($simulate_id);
15
16 if( $auth_user->level >= $auth_user->_const('LEVEL_MANAGER') ){
17 $acl->set_user( $acl_user );
18 }
19 }
20 }
21 }