function commerce_addressbook_profile_access in Commerce Addressbook 7.2
Access callback for entity-level operations. Acts as a wrapper around commerce_customer_profile_access.
1 call to commerce_addressbook_profile_access()
- commerce_addressbook_entity_view in ./
commerce_addressbook.module - Implements hook_entity_view().
1 string reference to 'commerce_addressbook_profile_access'
- commerce_addressbook_menu in ./
commerce_addressbook.module - Implements hook_menu().
File
- ./
commerce_addressbook.module, line 140 - Defines addressbook functionality for customer profiles, allowing them to be reused and managed on a per-user basis.
Code
function commerce_addressbook_profile_access($op, $customer_profile) {
// The addressbook is not enabled for this profile type.
if (!variable_get('commerce_customer_profile_' . $customer_profile->type . '_addressbook', FALSE)) {
return FALSE;
}
return commerce_customer_profile_access($op, $customer_profile);
}