You are here

public function CommerceCustomerProfileEntityController::attachLoad in Commerce Core 7

Unserializes the data property of loaded customer profiles.

Overrides DrupalDefaultEntityController::attachLoad

File

modules/customer/includes/commerce_customer_profile.controller.inc, line 119
The controller for the customer profile entity containing the CRUD operations.

Class

CommerceCustomerProfileEntityController
The controller class for customer profiles contains methods for the profile CRUD operations. The load method is inherited from the default controller.

Code

public function attachLoad(&$queried_profiles, $revision_id = FALSE) {
  foreach ($queried_profiles as $profile_id => &$profile) {
    $profile->data = unserialize($profile->data);
  }

  // Call the default attachLoad() method. This will add fields and call
  // hook_commerce_customer_profile_load().
  parent::attachLoad($queried_profiles, $revision_id);
}