26 $resultRedirect = $this->resultRedirectFactory->create();
29 $resultRedirect->setPath(
'customer/index');
30 return $resultRedirect;
35 $this->customerAccountManagement->initiatePasswordReset(
40 $this->messageManager->addSuccess(
__(
'The customer will receive an email with a link to reset password.'));
42 $resultRedirect->setPath(
'customer/index');
43 return $resultRedirect;
46 if (!count($messages)) {
47 $messages = $exception->getMessage();
51 $this->messageManager->addErrorMessage($exception->getMessage());
52 }
catch (\Exception $exception) {
53 $this->messageManager->addException(
55 __(
'Something went wrong while resetting customer password.')
58 $resultRedirect->setPath(
62 return $resultRedirect;
_addSessionErrorMessages($messages)