本文整理匯總了PHP中Helper_Config::getCompanyId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helper_Config::getCompanyId方法的具體用法?PHP Helper_Config::getCompanyId怎麽用?PHP Helper_Config::getCompanyId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Helper_Config
的用法示例。
在下文中一共展示了Helper_Config::getCompanyId方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: check
private function check()
{
$this->load->file('application/modules/app/login/login_data.php');
$resAjax = new Response_Ajax();
$dataLogin = new Data_App_Login(TRUE);
$dataLoginError = NULL;
//Helper_Log::write($_SESSION);
try {
$id_company = Helper_Config::getCompanyId();
if (!$dataLogin->isValid($dataLoginError, FALSE)) {
throw new Exception('Complete correctamente todos los campos 001');
}
$oBus = Business_App_User::login($dataLogin->username, $dataLogin->password);
if (!$oBus->isSuccess()) {
throw new Exception($oBus->message());
}
$data = $oBus->data();
/* @var $eUser eUser */
$eUser = $data['eUser'];
Helper_App_Session::init($id_company, $eUser->id);
$resAjax->isSuccess(TRUE);
} catch (Exception $ex) {
$resAjax->isSuccess(FALSE);
$resAjax->message($ex->getMessage());
$resAjax->data('login_error', $dataLoginError->toArray());
}
echo $resAjax->toJsonEncode();
}
示例2: check
private function check()
{
$this->load->file('application/modules/app/login/login_data.php');
$resAjax = new Response_Ajax();
$dataLogin = new Data_App_Login(TRUE);
$dataLoginError = NULL;
//Helper_Log::write($_SESSION);
try {
$id_company = Helper_Config::getCompanyId();
if (!$dataLogin->isValid($dataLoginError)) {
throw new Exception('Complete correctamente todos los campos 001');
}
if (ENVIRONMENT != 'development') {
if (!Helper_Captcha::isValid($this->name_key, $dataLogin->security)) {
throw new Exception('Código de seguridad inválido.');
//throw new Exception('Complete correctamente todos los campos 002');
}
}
$oBus = Business_App_User::login($dataLogin->username, $dataLogin->password);
if (!$oBus->isSuccess()) {
throw new Exception($oBus->message());
}
$data = $oBus->data();
/* @var $eUser eUser */
$eUser = $data['eUser'];
Helper_App_Session::init($id_company, $eUser->id);
//Helper_App_Session::buildData();
/*$eSessionActivity = new eSessionActivity();
$eSessionActivity->id_user = Helper_App_Session::getUserId();
$eSessionActivity->inUse = 1;
$eSessionActivity->last_activity = date('Y-m-d H:i:s');
$eSessionActivity->session_id = Helper_App_Session::getSessionID();
*/
//Helper_App_Activity::set($eSessionActivity);
$resAjax->isSuccess(TRUE);
} catch (Exception $ex) {
$resAjax->isSuccess(FALSE);
$resAjax->message($ex->getMessage());
$resAjax->data('login_error', $dataLoginError->toArray());
}
echo $resAjax->toJsonEncode();
}