$customerData =
[ 'id' =>
$customer->
getId(),
'password' =>
$data->
get('newPassword'
),
'legacyPassword' => null,
'legacyEncoder' => null,
];
$this->customerRepository->
update([$customerData],
$context->
getContext());
$this->
deleteRecoveryForCustomer($customerRecovery,
$context->
getContext());
return new SuccessResponse();
} /**
* @throws ConstraintViolationException
*/
private function validateResetPassword(DataBag
$data, SalesChannelContext
$context): void
{ $definition =
new DataValidationDefinition('customer.password.update'
);
$minPasswordLength =
$this->systemConfigService->
get('core.loginRegistration.passwordMinLength',
$context->
getSalesChannel()->
getId());