I found this file /vendor/magento/module-customer/Controller/Account/LoginPost.php file is having some code. What is the explanation of below code?

magento.stackexchange https://magento.stackexchange.com/questions/335321

I want to know what actually these two lines of code are doing.

    $redirectUrl = $this->accountRedirect->getRedirectCookie();
    if (!$this->getScopeConfig()->getValue('customer/startup/redirect_dashboard') && $redirectUrl) {
有帮助吗?

解决方案

The code above will Magento (after passing the conditions) to redirect the customer to the route saved in the redirect cookie after successful login if the configuration which says that all customers be redirected to their accounts' dashboard instead Stores -> Configuration -> Customers -> Login Options -> Redirect Customer to Account Dashboard after Logging in is not enabled.

See class vendor/magento/module-customer/Model/Account/Redirect.php for more details on how the redirect route is used.

许可以下: CC-BY-SA归因
scroll top