Skip to content

Commit c84c470

Browse files
committed
AC-10896: Customer account REST API fix
* CustomerId check added
1 parent 981ba5b commit c84c470

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Customer/Model/Plugin/UpdateCustomer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function beforeSave(
6363
$customerId === $customerSessionId
6464
) {
6565
$customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer);
66-
} elseif ($userType === UserContextInterface::USER_TYPE_ADMIN) {
66+
} elseif ($userType === UserContextInterface::USER_TYPE_ADMIN && $customerId) {
6767
$customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer);
6868
}
6969

0 commit comments

Comments
 (0)