address_user($op, &$edit, &$account, $category = NULL)
ecommerce-5--3/address/address.module, line 64
Implementation of hook_user()
<?php
function address_user($op, &$edit, &$account, $category = NULL) {
switch ($op) {
case 'view':
if (user_access('create invoice') && module_exists('invoice')) {
if ($invoice = invoice_get($account->uid)) {
$output.= l(t('edit pending invoice'), "admin/store/invoice/{$account->uid}/edit");
}
else {
$output.= l(t('create invoice'), "admin/store/invoice/add/{$account->uid}");
}
$items[] = array(
'value' => $output,
);
return array(t('Invoice') => $items);
}
break;
case 'delete':
db_query('DELETE FROM {ec_address} WHERE uid = %d', $account->uid);
break;
}
}
?>