Skip to content

Commit

Permalink
Fix the issue with customer inline edit when password is expired mage…
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro-ch committed Sep 28, 2018
1 parent 8460e4e commit 2eeb65c
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
namespace Magento\Customer\Controller\Adminhtml\Index;

use Magento\Backend\App\Action;
use Magento\Customer\Api\CustomerRepositoryInterface;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Customer\Model\EmailNotificationInterface;
use Magento\Customer\Test\Block\Form\Login;
use Magento\Customer\Ui\Component\Listing\AttributeRepository;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Customer\Api\CustomerRepositoryInterface;
use Magento\Framework\App\Action\HttpPostActionInterface;
use Magento\Framework\Message\MessageInterface;

/**
* Customer inline edit action
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class InlineEdit extends \Magento\Backend\App\Action implements HttpPostActionInterface
Expand Down Expand Up @@ -102,7 +104,11 @@ private function getEmailNotification()
}

/**
* Inline edit action execute
*
* @return \Magento\Framework\Controller\Result\Json
* @throws \Magento\Framework\Exception\LocalizedException
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function execute()
{
Expand Down Expand Up @@ -250,7 +256,7 @@ protected function processAddressData(array $data)
protected function getErrorMessages()
{
$messages = [];
foreach ($this->getMessageManager()->getMessages()->getItems() as $error) {
foreach ($this->getMessageManager()->getMessages()->getErrors() as $error) {
$messages[] = $error->getText();
}
return $messages;
Expand All @@ -263,7 +269,7 @@ protected function getErrorMessages()
*/
protected function isErrorExists()
{
return (bool)$this->getMessageManager()->getMessages(true)->getCount();
return (bool)$this->getMessageManager()->getMessages(true)->getCountByType(MessageInterface::TYPE_ERROR);
}

/**
Expand Down

0 comments on commit 2eeb65c

Please sign in to comment.