File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
app/code/Magento/Backend/Controller/Adminhtml/Auth Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -38,19 +38,30 @@ public function execute()
38
38
if ($ this ->_auth ->getAuthStorage ()->isFirstPageAfterLogin ()) {
39
39
$ this ->_auth ->getAuthStorage ()->setIsFirstPageAfterLogin (true );
40
40
}
41
- /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
42
- $ resultRedirect = $ this ->resultRedirectFactory ->create ();
43
- $ resultRedirect ->setPath ($ this ->_backendUrl ->getStartupPageUrl ());
44
- return $ resultRedirect ;
41
+ return $ this ->getRedirect ($ this ->_backendUrl ->getStartupPageUrl ());
45
42
}
46
43
47
44
$ requestUrl = $ this ->getRequest ()->getUri ();
48
45
$ backendUrl = $ this ->getUrl ('* ' );
49
46
// redirect according to rewrite rule
50
47
if ($ requestUrl != $ backendUrl ) {
51
- $ this ->_redirect ( ' * ' );
48
+ return $ this ->getRedirect ( $ backendUrl );
52
49
} else {
53
50
return $ this ->resultPageFactory ->create ();
54
51
}
55
52
}
53
+
54
+ /**
55
+ * Get redirect response
56
+ *
57
+ * @param string $path
58
+ * @return \Magento\Backend\Model\View\Result\Redirect
59
+ */
60
+ private function getRedirect ($ path )
61
+ {
62
+ /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
63
+ $ resultRedirect = $ this ->resultRedirectFactory ->create ();
64
+ $ resultRedirect ->setPath ($ path );
65
+ return $ resultRedirect ;
66
+ }
56
67
}
You can’t perform that action at this time.
0 commit comments