di.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  9. <type name="Magento\Captcha\Model\DefaultModel">
  10. <arguments>
  11. <argument name="session" xsi:type="object">Magento\Customer\Model\Session</argument>
  12. </arguments>
  13. </type>
  14. <type name="Magento\Captcha\Observer\CheckUserCreateObserver">
  15. <arguments>
  16. <argument name="session" xsi:type="object">Magento\Customer\Model\Session</argument>
  17. </arguments>
  18. </type>
  19. <type name="Magento\Captcha\Observer\CheckUserForgotPasswordBackendObserver">
  20. <arguments>
  21. <argument name="session" xsi:type="object">Magento\Customer\Model\Session</argument>
  22. </arguments>
  23. </type>
  24. <type name="Magento\Captcha\Observer\CheckUserLoginObserver">
  25. <arguments>
  26. <argument name="session" xsi:type="object">Magento\Customer\Model\Session</argument>
  27. </arguments>
  28. </type>
  29. <type name="Magento\Customer\Controller\Ajax\Login">
  30. <plugin name="captcha_validation" type="Magento\Captcha\Model\Customer\Plugin\AjaxLogin" sortOrder="50" />
  31. </type>
  32. <type name="Magento\Captcha\Model\Customer\Plugin\AjaxLogin">
  33. <arguments>
  34. <argument name="formIds" xsi:type="array">
  35. <item name="user_login" xsi:type="string">user_login</item>
  36. </argument>
  37. </arguments>
  38. </type>
  39. <type name="Magento\Checkout\Block\Cart\Sidebar">
  40. <plugin name="login_captcha" type="Magento\Captcha\Model\Cart\ConfigPlugin" sortOrder="50" />
  41. </type>
  42. </config>