Skip to content

Commit d5c1337

Browse files
committed
GLUE-2765 added check for the same customer
1 parent ba3035e commit d5c1337

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Spryker/Glue/CustomersRestApi/Processor/Customer/CustomerWriter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ public function updateCustomerPassword(
216216
return $this->restApiError->addCustomerNotFoundError($restResponse);
217217
}
218218

219-
if ($restRequest->getResource()->getId()
220-
&& $restRequest->getResource()->getId() !== $restRequest->getUser()->getNaturalIdentifier()) {
219+
$resourceId = $restRequest->getResource()->getId();
220+
if ($resourceId && $resourceId !== $restRequest->getUser()->getNaturalIdentifier()) {
221221
return $this->restApiError->addCustomerUnauthorizedError($restResponse);
222222
}
223223

0 commit comments

Comments
 (0)