You are here

function uc_addresses_address_load in Ubercart Addresses 7

Same name and namespace in other branches
  1. 6.2 uc_addresses.module \uc_addresses_address_load()
  2. 6 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.

1 string reference to 'uc_addresses_address_load'
uc_addresses_hook_info in ./uc_addresses.module
Implements hook_hook_info().

File

./uc_addresses.module, line 353
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);
}