You are here

function uc_addresses_address_load in Ubercart Addresses 6.2

Same name and namespace in other branches
  1. 6 uc_addresses.module \uc_addresses_address_load()
  2. 7 uc_addresses.module \uc_addresses_address_load()

Loads a single address by giving an user ID and an address ID.

This is used by the menu system when %uc_addresses_address is used in the path.

Parameters

int $aid: The value matched by %uc_addresses_address.

int $uid: The value of the user ID in the same path.

Return value

UcAddressesAddress if the value is a valid address it returns the address object. Otherwise FALSE will be returned.

File

./uc_addresses.module, line 356
Adds user profile address support to Ubercart.

Code

function uc_addresses_address_load($aid, $uid) {
  if (!$aid || !$uid) {
    return FALSE;
  }
  return UcAddressesAddressBook::get($uid)
    ->getAddressById($aid);
}