function commerce_customer_profile_access in Commerce Core 7
Checks customer profile access for various operations.
Parameters
$op: The operation being performed. One of 'view', 'update', 'create' or 'delete'.
$profile: Optionally a profile to check access for or for the create operation the profile type. If nothing is given access permissions for all profiles are returned.
$account: The user to check for. Leave it to NULL to check for the current user.
5 calls to commerce_customer_profile_access()
- commerce_customer_field_widget_form in modules/
customer/ commerce_customer.module - Implements hook_field_widget_form().
- commerce_customer_handler_field_customer_profile_link_delete::render in modules/
customer/ includes/ views/ handlers/ commerce_customer_handler_field_customer_profile_link_delete.inc - Render the field.
- commerce_customer_handler_field_customer_profile_link_edit::render in modules/
customer/ includes/ views/ handlers/ commerce_customer_handler_field_customer_profile_link_edit.inc - Render the field.
- commerce_customer_ui_customer_profile_add_any_access in modules/
customer/ commerce_customer_ui.module - Access callback: determine if the user can create any type of profile.
- commerce_customer_ui_customer_profile_uri in modules/
customer/ commerce_customer_ui.module - Entity uri callback: points to the edit form of the given profile.
3 string references to 'commerce_customer_profile_access'
- commerce_customer_entity_info in modules/
customer/ commerce_customer.module - Implements hook_entity_info().
- commerce_customer_ui_menu in modules/
customer/ commerce_customer_ui.module - Implements hook_menu().
- commerce_customer_views_data in modules/
customer/ includes/ views/ commerce_customer.views.inc - Implements hook_views_data()
File
- modules/
customer/ commerce_customer.module, line 736 - Defines the customer profile entity and API functions to manage customers and interact with them.
Code
function commerce_customer_profile_access($op, $profile = NULL, $account = NULL) {
return commerce_entity_access($op, $profile, $account, 'commerce_customer_profile');
}