src/Money/DataMapper/Mapper/Money/AccountMapper.php
public function findAllAccountByUserId($userId, $excludeVirtual = true)
    {
        $this->addWhere('user_id', $userId);

        if ($excludeVirtual) {
            $this->addWhere('account_id_parent', 0);
        }

        $query = 'SELECT ' . $this->getQueryFields() .
            ' FROM ' . $this->getTable() . ' ' .
            ' INNER JOIN money_account_user USING(account_id) ' .
            $this->getQueryWhere() . ' ' .
            $this->getQueryOrderBy() . ' ' .
            $this->getQueryLimit();

        return $this->query($query);
    }
public function findAllAccountByUserId($userId, $excludeVirtual = true)
    {
        $this->addWhere('user_id', $userId);

        if ($excludeVirtual) {
            $this->addWhere('account_id_parent', 0);
        }

        $query = 'SELECT ' . $this->getQueryFields() .
            ' FROM ' . $this->getTable() . ' ' .
            ' INNER JOIN money_account_user USING(account_id) ' .
            $this->getQueryWhere() . ' ' .
            $this->getQueryOrderBy() . ' ' .
            $this->getQueryLimit();

        return $this->query($query);
    }
Get list of account for given user.

@param  int $userId
@param  bool $excludeVirtual
@return \Eureka\Package\Money\DataMapper\Data\Money\Account[]