Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
If you expose the user profiles on a commerce site (sometimes it's needed) you get a link for addressbook on every profile page by adding the following arg check to the .module at line 103
function commerce_addressbook_page_access() {
global $user;
if ($user->uid == arg(1)){
foreach (commerce_customer_profile_types() as $type => $profile_type) {
if (variable_get('commerce_customer_profile_' . $type . '_addressbook', FALSE)) {
return $type;
}
}
}
return FALSE;
}
it only is available on the logged in user's page. I just noticed that this may need some altering for those with admin rights but it's a start.
Thoughts? or am I one off on this request?
Comments
Comment #1
jsacksick CreditAttribution: jsacksick commentedI don't really understand what you need here, this function doesn't look the same anymore, See http://drupalcode.org/project/commerce_addressbook.git/commit/a82fe3a, feel free to reopen the issue with more details please.
Comment #1.0
jsacksick CreditAttribution: jsacksick commentedclarified more
Comment #2
mglamanNo response, access was reworked. Closing.