You are here

function commerce_customer_ui_customer_profile_uri in Commerce Core 7

Entity uri callback: points to the edit form of the given profile.

1 string reference to 'commerce_customer_ui_customer_profile_uri'
commerce_customer_ui_entity_info_alter in modules/customer/commerce_customer_ui.module
Implements hook_entity_info_alter().

File

modules/customer/commerce_customer_ui.module, line 234

Code

function commerce_customer_ui_customer_profile_uri($profile) {

  // First look for a return value in the default entity uri callback.
  $uri = commerce_customer_profile_uri($profile);

  // If a value was found, return it now.
  if (!empty($uri)) {
    return $uri;
  }

  // Only return a value if the user has permission to view the profile.
  if (commerce_customer_profile_access('view', $profile)) {
    return array(
      'path' => 'admin/commerce/customer-profiles/' . $profile->profile_id,
    );
  }
  return NULL;
}