I want to know how can i redirect a user to the Forgot Password page after exceeding the number of unsuccessful login attempts in Magento 2. Thanks.
-
Make it redirection in your Login controller but i don't know number of Unsucess attempt– Magento 2Nov 3, 2017 at 7:00
-
I have already set the number of unsuccessful attempts to 3. I just have to do the redirection. I'm new to Magento 2 btw.– Mudz7Nov 3, 2017 at 7:06
-
Override this Controller in your Module vendor/magento/module-customer/Controller/Account/LoginPost.php there you need to set forget psw url Don't edit core file– Magento 2Nov 3, 2017 at 7:22
-
Can you show me how to do that exactly?– Mudz7Nov 3, 2017 at 7:29
Add a comment
|
1 Answer
I have done this and it works.
$resultRedirect = $this->resultRedirectFactory->create();
$resultRedirect->setPath('*/*/forgotPassword');
return $resultRedirect;