本文整理汇总了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();
}