Linked Questions

1 vote
4 answers
2k views

Magento 2 - Error trying Redirect to login page for controller if not logged in

I know this question has been asked before a couple of times here: Magento 2 : Redirect From Homepage to Login if not Logged Magento 2 - Redirect user to a specific page if not logged in However i ...
harri's user avatar
  • 5,485
3 votes
2 answers
8k views

Magento redirect from all pages if not logged in

So, I need to redirect user to some page(tt can be CMS or customer/account) if he did not logged. And on this page(CMS or customer/account) I will have a form to login/register. So, I made an observer ...
sergio's user avatar
  • 407
1 vote
2 answers
1k views

Magento2 : Redirect Page From Observer

I want to restrict some unwanted users to access the site. So I am redirecting them to 404 Page but my logic is going to an infinite loop as the event I am calling from controller_action_predispatch ...
Priyank's user avatar
  • 7,702
5 votes
1 answer
1k views

Logged In or Not check works only in Customer pages not other pages Magento 2

User logged in or not checking not works in other pages such as Product, Category and other static pages but its works well on customer pages like Dashboard, Address book, Orders etc... Here is my ...
Riyas Muhammed's user avatar
1 vote
1 answer
519 views

Set Login page has store home page in Magento 2

In Magento 2, I need to redirect the store to login page when user enters the store address instead of homepage.
prashanth's user avatar
1 vote
1 answer
485 views

Magento 2: How to set module wise login permission access? [duplicate]

I have below files \app\code\Custom\Module\Controller\MyModule\NewAction.php \app\code\Custom\Module\Controller\MyModule\Edit.php \app\code\Custom\Module\Controller\MyModule\Form.php I would like to ...
Jackson's user avatar
  • 9,939
0 votes
1 answer
170 views

Show login page instead of homepage

I want to change default home page to login page in Magento 2.3 Mean that want to see customer login instead of homepage
MGPM's user avatar
  • 751
0 votes
1 answer
238 views

Redirect in observer http 500

I am trying to redirect in my controller_action_predispatch observer. However, I got http 500 error, unable to handle the request Note: I got the error 500 once i include \Magento\Framework\App\...
stackdisplay's user avatar
0 votes
1 answer
382 views

Redirect if not logged in Magento 2? [duplicate]

What logic uses magento 2 for checking user login in account pages? I know about solution like $this->session->isLoggedIn(), but I need more globally for several controllers. What I need to use?
Mykhailo Shatilov's user avatar
0 votes
1 answer
2k views

Magento2 : Redirect from observer

I have already implemented This solution , but it is not working for me I am trying to redirect customer after login to different page rather than my account What i tried \app\code\Mycompany\...
Vishwas Bhatnagar's user avatar