File tree 1 file changed +8
-1
lines changed
app/code/Magento/Customer/Controller/Account 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,17 @@ public function __construct(
40
40
/**
41
41
* Forgot customer password page
42
42
*
43
- * @return \Magento\Framework\View\Result\Page
43
+ * @return \Magento\Framework\Controller\Result\Redirect|\Magento\Framework\ View\Result\Page
44
44
*/
45
45
public function execute ()
46
46
{
47
+ if ($ this ->session ->isLoggedIn ()) {
48
+ /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
49
+ $ resultRedirect = $ this ->resultRedirectFactory ->create ();
50
+ $ resultRedirect ->setPath ('*/*/ ' );
51
+ return $ resultRedirect ;
52
+ }
53
+
47
54
/** @var \Magento\Framework\View\Result\Page $resultPage */
48
55
$ resultPage = $ this ->resultPageFactory ->create ();
49
56
$ resultPage ->getLayout ()->getBlock ('forgotPassword ' )->setEmailValue ($ this ->session ->getForgottenEmail ());
You can’t perform that action at this time.
0 commit comments