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 ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top