Beispiel #1
0
 /**
  * @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));
 }
Beispiel #2
0
 /**
  * @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());
 }