promo update
This commit is contained in:
@@ -54,8 +54,8 @@ abstract class BaseController extends Controller
|
||||
// Preload any models, libraries, etc, here.
|
||||
|
||||
// E.g.: $this->session = \Config\Services::session();
|
||||
//$this->session = \Config\Services::session();
|
||||
$this->session = service('session');
|
||||
$this->session = \Config\Services::session();
|
||||
// $this->session = service('session');
|
||||
$httpHost = $_SERVER['HTTP_HOST'];
|
||||
|
||||
if ( $httpHost == 'https://promo.wrenchboard.com' || $httpHost == 'promo.wrenchboard.com' ){
|
||||
|
||||
@@ -10,9 +10,13 @@ class PromoAdmin extends BaseController
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
if(!isset($_SESSION['sessionid'])){
|
||||
// redirect('promoadmin','refresh');
|
||||
// exit();
|
||||
$sessionid =$_SESSION['sessionid']?? '';
|
||||
if(!isset($sessionid) || $sessionid=''){
|
||||
//redirect('promoadmin');
|
||||
$urlLogin = base_url('promoadmin');
|
||||
header('Location: '.$urlLogin);
|
||||
exit;
|
||||
//exit();
|
||||
// var_dump($_SESSION?? 'No Session');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user