Skip to content

Commit c6ad842

Browse files
AnujNehraAnujNehra
authored andcommitted
ACP2E-1776: Creating customer(-s) via Async REST API ignores group_id
1 parent 6f2a12d commit c6ad842

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/code/Magento/Customer/Model/AccountManagementApi.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Magento\Customer\Model\Metadata\Validator;
1818
use Magento\Framework\Api\ExtensibleDataObjectConverter;
1919
use Magento\Framework\App\Config\ScopeConfigInterface;
20-
use Magento\Framework\App\ObjectManager;
2120
use Magento\Framework\AuthorizationInterface;
2221
use Magento\Framework\DataObjectFactory as ObjectFactory;
2322
use Magento\Framework\Encryption\EncryptorInterface as Encryptor;
@@ -99,8 +98,7 @@ public function __construct(
9998
ExtensibleDataObjectConverter $extensibleDataObjectConverter,
10099
AuthorizationInterface $authorization
101100
) {
102-
$objectManager = ObjectManager::getInstance();
103-
$this->authorization = $authorization ?? $objectManager->get(AuthorizationInterface::class);
101+
$this->authorization = $authorization;
104102
parent::__construct(
105103
$customerFactory,
106104
$eventManager,
@@ -133,7 +131,7 @@ public function __construct(
133131
*
134132
* Override createAccount method to unset confirmation attribute for security purposes.
135133
*/
136-
public function createAccount(CustomerInterface $customer, $password = null, $redirectUrl = '')
134+
public function createAccount(CustomerInterface $customer, $password = null, $redirectUrl = ''): CustomerInterface
137135
{
138136
$this->validateCustomerRequest($customer);
139137
$customer = parent::createAccount($customer, $password, $redirectUrl);

0 commit comments

Comments
 (0)