function commerce_addressbook_page in Commerce Addressbook 7.3
Same name and namespace in other branches
- 7.2 includes/commerce_addressbook.user.inc \commerce_addressbook_page()
Page callback for path /user/%user/addressbook.
Displays first enabled profile type addressbook page if user is logged in, or access denied for anonymous.
1 string reference to 'commerce_addressbook_page'
- commerce_addressbook_menu in ./
commerce_addressbook.module - Implements hook_menu().
File
- includes/
commerce_addressbook.user.inc, line 151 - Page callbacks and form callbacks for user addressbook pages.
Code
function commerce_addressbook_page($account) {
if ($account->uid) {
if ($type = commerce_addressbook_page_access($account)) {
menu_set_active_item('user/' . $account->uid . '/addressbook/' . $type);
return menu_execute_active_handler(NULL, FALSE);
}
}
// The below line should never get called but in case it does we will return
// an empty address book message.
return '<div class="addressbook-nodata">' . t('Your address book is currently empty.') . '</div>';
}