Ejemplo n.º 1
0
 /**
  * @return CTenant
  */
 public function GetTenantAdminObject()
 {
     $oTenant = null;
     $iTenantId = $this->oAdminPanel->TenantId();
     if ($this->oTenantsApi) {
         if (0 < $iTenantId) {
             $oTenant = $this->oTenantsApi->GetTenantById($iTenantId);
         } else {
             $oTenant = $this->oTenantsApi->GetDefaultGlobalTenant();
         }
     }
     return $oTenant;
 }
Ejemplo n.º 2
0
 public function AjaxSocialAccountDelete()
 {
     $mResult = false;
     $oTenant = null;
     $oAccount = $this->GetDefaultAccount();
     if ($oAccount && $this->oApiTenants) {
         $oTenant = 0 < $oAccount->IdTenant ? $this->oApiTenants->GetTenantById($oAccount->IdTenant) : $this->oApiTenants->GetDefaultGlobalTenant();
     }
     if ($oTenant) {
         $iType = (int) trim($this->getParamValue('Type', 0));
         $oApiSocial = \CApi::Manager('social');
         $mResult = $oApiSocial->DeleteSocial($oAccount->IdAccount, $iType);
     }
     return $this->DefaultResponse(null, __FUNCTION__, $mResult);
 }