function commerce_addressbook_page_access in Commerce Addressbook 7.3
Same name and namespace in other branches
- 7.2 commerce_addressbook.module \commerce_addressbook_page_access()
Access callback for path /user/%user/addressbook.
Return the first enabled profile type if there's one, or FALSE.
1 call to commerce_addressbook_page_access()
- commerce_addressbook_page in includes/
commerce_addressbook.user.inc - Page callback for path /user/%user/addressbook.
1 string reference to 'commerce_addressbook_page_access'
- commerce_addressbook_menu in ./
commerce_addressbook.module - Implements hook_menu().
File
- ./
commerce_addressbook.module, line 120 - Defines addressbook functionality for customer profiles, allowing them to be reused and managed on a per-user basis.
Code
function commerce_addressbook_page_access($account) {
foreach (commerce_customer_profile_types() as $type => $profile_type) {
if (commerce_addressbook_profile_page_access($account, $type)) {
return $type;
}
}
return FALSE;
}