Get user address data as array.

@return array $aUserAddressData
338985
protected function GetUserAddressData()
    {
        $aUserAddressData = array();
        $oActiveUser = TdbDataExtranetUser::GetInstance();
        if ($oActiveUser) {
            $oBillingAddress = $oActiveUser->GetBillingAddress();
            if ($oBillingAddress) {
                $aUserAddressData['addr_street'] = $oBillingAddress->fieldStreet.' '.$oBillingAddress->fieldStreetnr;
                $aUserAddressData['addr_zip'] = $oBillingAddress->fieldPostalcode;
                $aUserAddressData['addr_city'] = $oBillingAddress->fieldCity;
                $aUserAddressData['addr_country'] = $this->GetBillingCountryISOCode($oBillingAddress);
                $aUserAddressData['addr_email'] = $oActiveUser->fieldName;
            }
        }

        return $aUserAddressData;
    }
14830
protected function getData()
    {
        if ($this->argument('user')) {
            return [
                'name' => $this->argument('name'),
                'user' => $this->argument('user'),
                'password' => $this->argument('password')
            ];
        } else {
            return [
                'name' => $this->argument('name')
            ];
        }
    }
199043
public function toArray()
	{
		$list = parent::toArray();

		$list['order.base.address.baseid'] = $this->getBaseId();
		$list['order.base.address.addressid'] = $this->getAddressId();
		$list['order.base.address.type'] = $this->getType();

		return $list;
	}
153394
public function getData(): array
    {
        return [
            $this->serverOriginScheme,
            $this->serverOriginHost,
            $this->serverOriginPort,
            $this->isPreFlightCanBeCached,
            $this->preFlightCacheMaxAge,
            $this->isForceAddMethods,
            $this->isForceAddHeaders,
            $this->isUseCredentials,
            $this->areAllOriginsAllowed,
            $this->allowedOrigins,
            $this->areAllMethodsAllowed,
            $this->allowedLcMethods,
            $this->allowedMethodsList,
            $this->areAllHeadersAllowed,
            $this->allowedLcHeaders,
            $this->allowedHeadersList,
            $this->exposedHeadersList,
            $this->isCheckHost,
        ];
    }
312516
protected function getListAddress()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;
        $addresses = (array) $this->address->getList($conditions);

        $this->prepareListAddress($addresses);
        return $addresses;
    }
664647
public function getData()
    {
        return [
            self::POSTCODE_ATTR => $this->postcode,
            self::COUNTRY_ATTR => $this->country->getCode(),
        ];
    }
126815
public static function getUserIp()
    {
        $ipHeaders = [
            'HTTP_CLIENT_IP',
            'HTTP_X_FORWARDED_FOR',
            'HTTP_X_FORWARDED',
            'HTTP_X_CLUSTER_CLIENT_IP',
            'HTTP_FORWARDED_FOR',
            'HTTP_FORWARDED',
            'REMOTE_ADDR'
        ];

        foreach ($ipHeaders as $ipHeader){
            if (array_key_exists($ipHeader, $_SERVER) === true){

                foreach (explode(',', $_SERVER[$ipHeader]) as $ip){

                    $ip = trim($ip);

                    if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false){
                        return $ip;
                    }

                }

            }
        }

        return null;
    }
392093
public function getInputsAddresses()
    {
        $addresses = array();
        foreach ($this->getTx()->getInputs() as $txInput) {
            $inputAddresses = $txInput->getAddresses();
            if (is_array($inputAddresses)) {
                $addresses = array_merge($addresses, $inputAddresses);
            }
        }
        return $addresses;
    }
1270139
protected function getCountryFormatAddress()
    {
        $updating = $this->getUpdating();

        if (isset($updating['country_format'])) {
            return $updating['country_format'];
        }

        $field = 'country';
        $code = $this->getSubmitted($field);

        if (!isset($code)) {
            return $this->country->getDefaultFormat();
        }

        $country = $this->country->get($code);

        if (empty($country['format'])) {
            $this->setErrorUnavailable($field, $this->translation->text('Country'));
            return array();
        }

        return $country['format'];
    }
156122
protected function getBillingAddressData(array $data = [])
    {
        $address = $this->getAddressData('Billing');

        foreach ($address as $name => $value) {
            $data['Billing' . $name] = $value;
        }

        return $data;
    }
243350
public function getWrongEmailUsers()
    {
        if (version_compare($this->appbox->get_version(), '3.9', '>=')) {
            return [];
        }

        $builder = $this->appbox->get_connection()->createQueryBuilder();
        /** @var Statement $stmt */
        $stmt = $builder
            ->select('u.usr_mail', 'u.usr_id', 'u.last_conn', 'u.usr_login')
            ->from($this->table, 'u')
            ->where($builder->expr()->isNotNull('u.usr_mail'))
            ->execute()
        ;
        $rs = $stmt->fetchAll(\PDO::FETCH_ASSOC);
        $stmt->closeCursor();

        $users = [];

        foreach ($rs as $row) {
            if (!isset($users[$row['usr_mail']])) {
                $users[$row['usr_mail']] = [];
            }

            $users[$row['usr_mail']][] = $row;
        }

        $badUsers = [];

        foreach ($users as $email => $usrs) {
            if (count($usrs) > 1) {
                $badUsers[$email] = [];
                foreach ($usrs as $usrInfo) {
                    $badUsers[$email][$usrInfo['usr_id']] = $usrInfo;
                }
            }
        }

        unset($users);

        return $badUsers;
    }
466081
public function getAddresses()
    {
        $contactAddresses = $this->entity->getContactAddresses();
        $addresses = [];

        if (!is_null($contactAddresses)) {
            /** @var ContactAddressEntity $contactAddress */
            foreach ($contactAddresses as $contactAddress) {
                $address = $contactAddress->getAddress();
                $address->setPrimaryAddress($contactAddress->getMain());
                $addresses[] = new Address($address, $this->locale);
            }
        }

        return $addresses;
    }
1157939
public function toArray()
    {
      $_address = [];

      if($this->hasCountry())
        $_address['country'] = $this->getCountry();

      if($this->hasState())
        $_address['state'] = $this->getState();

      if($this->hasMunicipality())
        $_address['municipality'] = $this->getMunicipality();

      if($this->hasCity())
        $_address['city'] = $this->getCity();

      if($this->hasDistrict())
        $_address['district'] = $this->getDistrict();

      if($this->hasNeighbourhood())
        $_address['neighbourhood'] = $this->getNeighbourhood();

      if($this->hasStreet())
        $_address['street'] = $this->getStreet();

      if($this->hasNumber())
        $_address['number'] = $this->getNumber();

      if($this->hasAddition())
        $_address['addition'] = $this->getAddition();

      if($this->hasZipcode())
        $_address['zipcode'] = $this->getZipcode();

      return $_address;
    }
545933
protected function getEmailAddresses()
    {
        $addresses = array();
        $committer = $this->build->getCommitterEmail();

        if (isset($this->options['committer']) && !empty($committer)) {
            $addresses[] = $committer;
        }

        if (isset($this->options['addresses'])) {
            foreach ($this->options['addresses'] as $address) {
                $addresses[] = $address;
            }
        }

        if (empty($addresses) && isset($this->options['default_mailto_address'])) {
            $addresses[] = $this->options['default_mailto_address'];
        }

        return array_unique($addresses);
    }
1086259
public static function getUsersArray(): array
    {
        return static::find()->select(['username', 'id'])->where(['status_id' => self::STATUS_ACTIVE])->indexBy('id')->orderBy(['id' => SORT_ASC])->column();
    }
1209882
public function toArray()
	{
		$result = parent::toArray();

		if (isset($result['activated']))
		{
			$result['activated'] = $this->getActivatedAttribute($result['activated']);
		}
		if (isset($result['permissions']))
		{
			$result['permissions'] = $this->getPermissionsAttribute($result['permissions']);
		}
		if (isset($result['suspended_at']))
		{
			$result['suspended_at'] = $result['suspended_at']->format('Y-m-d H:i:s');
		}

		return $result;
	}
1329698
public function getFromAddress()
    {
        // get sender address
        $headers = $this->message->headers();
        $from    = rcube_mime::decode_address_list($headers['From'], 1, false, null, true);
        $from    = $from[1];

        return $from;
    }