File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
app/code/Magento/LoginAsCustomerAdminUi/Controller/Adminhtml/Login Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 13
13
use Magento \Customer \Api \CustomerRepositoryInterface ;
14
14
use Magento \Framework \App \Action \HttpPostActionInterface ;
15
15
use Magento \Customer \Model \Config \Share ;
16
- use Magento \Framework \App \Action \HttpGetActionInterface ;
17
16
use Magento \Framework \App \ObjectManager ;
18
17
use Magento \Framework \Controller \Result \Json as JsonResult ;
19
18
use Magento \Framework \Controller \ResultFactory ;
@@ -247,9 +246,9 @@ private function getLoginProceedRedirectUrl(string $secret, int $storeId): strin
247
246
->setScope ($ targetStore )
248
247
->getUrl ('loginascustomer/login/index ' , ['_query ' => $ queryParameters , '_nosid ' => true ]);
249
248
250
- if (! $ targetStore -> isUseStoreInUrl ()) {
251
- $ fromStore = $ this -> storeManager -> getStore ();
252
- $ redirectUrl = $ this ->manageStoreCookie ->switch ($ fromStore , $ targetStore , $ redirectUrl );
249
+ $ defaultStore = $ this -> storeManager -> getDefaultStoreView ();
250
+ if ( $ targetStore -> getBaseUrl () === $ defaultStore -> getBaseUrl ()) {
251
+ $ redirectUrl = $ this ->manageStoreCookie ->switch ($ defaultStore , $ targetStore , $ redirectUrl );
253
252
}
254
253
255
254
return $ redirectUrl ;
You can’t perform that action at this time.
0 commit comments