source/Application/Model/User.php
public function getUserAddresses($sUserId = null)
    {
        $sUserId = isset($sUserId) ? $sUserId : $this->getId();
        if (!isset($this->_aAddresses[$sUserId])) {
            $oUserAddressList = oxNew(\OxidEsales\Eshop\Application\Model\UserAddressList::class);
            $oUserAddressList->load($sUserId);
            $this->_aAddresses[$sUserId] = $oUserAddressList;

            // marking selected
            if ($sAddressId = $this->getSelectedAddressId()) {
                foreach ($this->_aAddresses[$sUserId] as $oAddress) {
                    if ($oAddress->getId() === $sAddressId) {
                        $oAddress->setSelected();
                        break;
                    }
                }
            }
        }

        return $this->_aAddresses[$sUserId];
    }
public function getUserAddresses($sUserId = null)
    {
        $sUserId = isset($sUserId) ? $sUserId : $this->getId();
        if (!isset($this->_aAddresses[$sUserId])) {
            $oUserAddressList = oxNew(\OxidEsales\Eshop\Application\Model\UserAddressList::class);
            $oUserAddressList->load($sUserId);
            $this->_aAddresses[$sUserId] = $oUserAddressList;

            // marking selected
            if ($sAddressId = $this->getSelectedAddressId()) {
                foreach ($this->_aAddresses[$sUserId] as $oAddress) {
                    if ($oAddress->getId() === $sAddressId) {
                        $oAddress->setSelected();
                        break;
                    }
                }
            }
        }

        return $this->_aAddresses[$sUserId];
    }
public function getUserAddresses ( $ sUserId = null ) { $ sUserId = isset ( $ sUserId ) ? $ sUserId : $ this -> getId ( ) ; if ( ! isset ( $ this -> _aAddresses [ $ sUserId ] ) ) { $ oUserAddressList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ UserAddressList :: class ) ; $ oUserAddressList -> load ( $ sUserId ) ; $ this -> _aAddresses [ $ sUserId ] = $ oUserAddressList ; // marking selected if ( $ sAddressId = $ this -> getSelectedAddressId ( ) ) { foreach ( $ this -> _aAddresses [ $ sUserId ] as $ oAddress ) { if ( $ oAddress -> getId ( ) === $ sAddressId ) { $ oAddress -> setSelected ( ) ; break ; } } } } return $ this -> _aAddresses [ $ sUserId ] ; }
Returns user defined Address list object

@param string $sUserId object ID (default is null)

@return array
Returns user defined Address list object