Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
#910: [Customer] Deprecate group_id in Customer
Browse files Browse the repository at this point in the history
  • Loading branch information
lenaorobei committed Sep 20, 2019
1 parent 01e5ab5 commit dbbcdb1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public function execute(CustomerInterface $customer): array
}
}
$customerData = array_merge($customerData, $customAttributes);

//Field is deprecated and should not be exposed on storefront.
$customerData['group_id'] = null;
$customerData['model'] = $customer;
return $customerData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ public function execute(ContextInterface $context): CustomerInterface
if ($confirmationStatus === AccountManagementInterface::ACCOUNT_CONFIRMATION_REQUIRED) {
throw new GraphQlAuthenticationException(__("This account isn't confirmed. Verify and try again."));
}
return $customer->setGroupId(null);
return $customer;
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/CustomerGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type RevokeCustomerTokenOutput {

type Customer @doc(description: "Customer defines the customer name and address and other details") {
created_at: String @doc(description: "Timestamp indicating when the account was created")
group_id: Int @doc(description: "The group assigned to the user. Default values are 0 (Not logged in), 1 (General), 2 (Wholesale), and 3 (Retailer)") @deprecated(reason: "Customer group should not be exposed in the storefront scenarios.")
group_id: Int @deprecated(reason: "Customer group should not be exposed in the storefront scenarios")
prefix: String @doc(description: "An honorific, such as Dr., Mr., or Mrs.")
firstname: String @doc(description: "The customer's first name")
middlename: String @doc(description: "The customer's middle name")
Expand Down

0 comments on commit dbbcdb1

Please sign in to comment.