Load customer address by ID, Magento

magento

Solution

Assuming that the 'ID' is referring to the address id (and not the customer id) then

$id = 5;
Mage::getModel('customer/address')->load($id);

(it always wise to do security check when loading by id)

See deleteAction() in app/code/core/Mage/Customer/controllers/AddressController.php

Problem

Is there a way to load a customer's address by ID? Like the way customer loading by username does: ``` $customer->loadByEmail($customerEmail); ``` I need it because I'm trying to know if the address already exists so I can decide to create a new one or to update the existing one

Original source