function __construct() { parent::__construct(); $this->load->library(array('email')); $this->load->model(array('account/account_facebook_model', 'account/account_google_model', 'account/account_twitter_model', 'account/account_openid_model')); $this->load->language(array('account/connect_third_party')); }
function __construct() { parent::__construct(); if ($this->account_model->get_by_id($this->session->userdata('account_id'))) { // Retrieve sign in user $this->data['account'] = $this->account_model->get_by_id($this->session->userdata('account_id')); $this->data['account_details'] = $this->account_details_model->get_by_account_id($this->session->userdata('account_id')); } }
/** * @param array|null $restrictions Key => Value Array, where key is the permission and Value is the Controller * * @return array|null Array with account and account_details data or null if auth fails */ protected function auth($restrictions = null) { if (!$this->authentication->is_signed_in()) { $this->data['error'] = array('code' => 1, 'type' => 'AuthError', 'msg' => lang('services_auth_error')); $this->shapeResponse(); exit(0); } return parent::auth(null, $restrictions); }
function __construct() { parent::__construct(); $this->load->model(array('manage/product_model')); }
<?php define("ROOT", __DIR__ . "\\"); include ROOT . "controllers\\GeneralController.php"; include ROOT . "controllers\\Routes.php"; GeneralController::main();