本文整理汇总了PHP中CApi::LogEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP CApi::LogEvent方法的具体用法?PHP CApi::LogEvent怎么用?PHP CApi::LogEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CApi
的用法示例。
在下文中一共展示了CApi::LogEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AjaxSystemLogout
/**
* @return array
*/
public function AjaxSystemLogout()
{
setcookie('aft-cache-ctrl', '', time() - 3600);
$sAuthToken = (string) $this->getParamValue('AuthToken', '');
$oAccount = $this->getAccountFromParam(false);
if ($oAccount && $oAccount->User && 0 < $oAccount->User->IdHelpdeskUser && $this->oApiCapability->isHelpdeskSupported($oAccount)) {
$this->oApiIntegrator->logoutHelpdeskUser();
}
$sLastErrorCode = $this->getParamValue('LastErrorCode');
if (0 < strlen($sLastErrorCode) && $this->oApiIntegrator && 0 < (int) $sLastErrorCode) {
$this->oApiIntegrator->setLastErrorCode((int) $sLastErrorCode);
}
\CApi::LogEvent(\EEvents::Logout, $oAccount);
return $this->DefaultResponse($oAccount, __FUNCTION__, $this->oApiIntegrator->logoutAccount($sAuthToken));
}
示例2: AjaxSystemLogout
/**
* @return array
*/
public function AjaxSystemLogout()
{
\CSession::Clear('aft-cache-ctrl');
$oAccount = $this->getAccountFromParam(false);
if ($oAccount && $oAccount->User && 0 < $oAccount->User->IdHelpdeskUser && $this->oApiCapability->IsHelpdeskSupported($oAccount)) {
$this->oApiIntegrator->LogoutHelpdeskUser();
}
$sLastErrorCode = $this->getParamValue('LastErrorCode');
if (0 < strlen($sLastErrorCode) && $this->oApiIntegrator && 0 < (int) $sLastErrorCode) {
$this->oApiIntegrator->SetLastErrorCode((int) $sLastErrorCode);
}
\CApi::LogEvent(\EEvents::Logout, $oAccount);
return $this->DefaultResponse($oAccount, __FUNCTION__, $this->oApiIntegrator->LogoutAccount());
}