/** * Initialize the controller * * 1. Import the user * 2. Call the parent constructor * 3. Authenticate the user * 4. Load the language files * DO NOT CHANGE THIS ORDER! */ public function __construct() { $this->import('BackendUser', 'User'); parent::__construct(); $this->User->authenticate(); \System::loadLanguageFile('default'); }
/** * Initialize the controller * * 1. Import the user * 2. Call the parent constructor * 3. Authenticate the user * 4. Load the language files * DO NOT CHANGE THIS ORDER! */ public function __construct() { $this->import('BackendUser', 'User'); parent::__construct(); $this->User->authenticate(); // Password change required if ($this->User->pwChange) { /** @var SessionInterface $session */ $session = \System::getContainer()->get('session'); $objSession = $this->Database->prepare("SELECT su FROM tl_session WHERE sessionID=? AND pid=?")->execute($session->getId(), $this->User->id); if (!$objSession->su) { $this->redirect('contao/password.php'); } } // Front end redirect if (\Input::get('do') == 'feRedirect') { $this->redirectToFrontendPage(\Input::get('page'), \Input::get('article')); } // Convenience functions if ($this->User->isAdmin) { // Maintenance mode off if (\Input::get('mmo')) { \Config::persist('maintenanceMode', false); $this->redirect($this->getReferer()); } // Build internal cache if (\Input::get('bic')) { $this->import('Automator'); $this->Automator->generateInternalCache(); $this->redirect($this->getReferer()); } } \System::loadLanguageFile('default'); \System::loadLanguageFile('modules'); }
/** * Get the current action * * @param string $strAction * * @throws \Exception */ public function __construct($strAction) { if ($strAction == '') { throw new \Exception('Missing Ajax action'); } $this->strAction = $strAction; parent::__construct(); }
/** * Constructor */ public function __construct() { try { $this->apiKey = Config::get('clr_api_key'); $this->soap = new SoapClient(Config::get('clr_wsdl_url')); } catch (Exception $e) { $this->log('Kein API-Key oder WSDL-File für cleverreach.de in den Einstellungen hinterlegt', 'CleverReach::construct', TL_ERROR); } parent::__construct(); }
/** * Initialize the controller * * 1. Import the user * 2. Call the parent constructor * 3. Authenticate the user * 4. Load the language files * DO NOT CHANGE THIS ORDER! */ public function __construct() { $this->import('BackendUser', 'User'); parent::__construct(); $this->User->authenticate(); \System::loadLanguageFile('default'); $strFile = \Input::get('src', true); $strFile = base64_decode($strFile); $strFile = preg_replace('@^/+@', '', rawurldecode($strFile)); $this->strFile = $strFile; }
/** * Initialize the controller * * 1. Import the user * 2. Call the parent constructor * 3. Authenticate the user * 4. Load the language files * DO NOT CHANGE THIS ORDER! */ public function __construct() { $this->import('BackendUser', 'User'); parent::__construct(); $this->User->authenticate(); // Password change required if ($this->User->pwChange) { $objSession = $this->Database->prepare("SELECT su FROM tl_session WHERE hash=?")->execute($this->getSessionHash('BE_USER_AUTH')); if (!$objSession->su) { $this->redirect('contao/password.php'); } } // Front end redirect if (\Input::get('do') == 'feRedirect') { $this->redirectToFrontendPage(\Input::get('page'), \Input::get('article')); } \System::loadLanguageFile('default'); \System::loadLanguageFile('modules'); }
/** * Initialize the controller * * 1. Import the user * 2. Call the parent constructor * 3. Login the user * 4. Load the language files * DO NOT CHANGE THIS ORDER! */ public function __construct() { $this->import('BackendUser', 'User'); parent::__construct(); // Login if ($this->User->login()) { $strUrl = 'contao/main.php'; // Redirect to the last page visited if (\Input::get('referer', true) != '') { $strUrl = base64_decode(\Input::get('referer', true)); } $this->redirect($strUrl); } elseif (!empty($_POST['username']) && !empty($_POST['password'])) { $this->reload(); } elseif ($this->User->logout()) { $this->reload(); } \System::loadLanguageFile('default'); \System::loadLanguageFile('tl_user'); }
/** * Import the back end user object */ public function __construct() { parent::__construct(); $this->import('BackendUser', 'User'); }
/** * Import the back end user object */ public function __construct() { parent::__construct(); \System::loadLanguageFile('foundation'); $this->import('BackendUser', 'User'); }