예제 #1
0
 /**
  * @param string $sAuthToken = ''
  * @return \CAccount | null
  */
 public function GetDefaultAccount($sAuthToken = '')
 {
     $oResult = null;
     $iUserId = $this->oApiIntegrator->GetLogginedUserId($sAuthToken);
     if (0 < $iUserId) {
         $iAccountId = $this->oApiUsers->GetDefaultAccountId($iUserId);
         if (0 < $iAccountId) {
             $oAccount = $this->oApiUsers->GetAccountById($iAccountId);
             if ($oAccount instanceof \CAccount && !$oAccount->IsDisabled) {
                 $oResult = $oAccount;
             }
         }
     }
     return $oResult;
 }