function _uc_addresses_db_delete_address in Ubercart Addresses 5
Same name and namespace in other branches
- 5.2 uc_addresses.module \_uc_addresses_db_delete_address()
- 6 uc_addresses.module \_uc_addresses_db_delete_address()
Delete an address from the database.
Parameters
$aid The id of the address to delete.:
Return value
Returns TRUE if the address was deleted.
1 call to _uc_addresses_db_delete_address()
- uc_addresses_delete_address_confirm_form_submit in ./
uc_addresses.module - Delete a user-confirmed address.
File
- ./
uc_addresses.module, line 1560
Code
function _uc_addresses_db_delete_address($aid) {
if (_uc_addresses_db_check_if_default($aid)) {
drupal_set_message(t('You cannot delete your default address'), 'warning');
return FALSE;
}
else {
db_query("DELETE FROM {uc_addresses} WHERE aid = %d", $aid);
return TRUE;
}
}