Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Authentication for all front pages
 
nico5
Sr. Member
 
Avatar
Total Posts:  214
Joined:  2008-02-19
France
 

Hi,

I work on a b2b e-commerce site.
I would like to force the customer to authenticate before viewing the front pages.

So I would like to know if is it possible to rewrite the class Mage_Core_Controller_Front_Action which is extended by all front controllers

This class is neither a helper, nor a model, nor a block and nor a controller ...

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
retif
Sr. Member
 
Total Posts:  171
Joined:  2008-08-16
Odessa, Ukraine
 

u extend this class in every your controller,

u can write your own front_action and extend it in controllers, or you can just extend all your controllers from admin front controller, which already solved your problem

 
Magento Community Magento Community
Magento Community
Magento Community
 
nico5
Sr. Member
 
Avatar
Total Posts:  214
Joined:  2008-02-19
France
 

@retif

with your first solution I have to override all front controllers, this is not a good solution
your second solution is not possible because the admin users and front users are different.

 
Magento Community Magento Community
Magento Community
Magento Community
 
retif
Sr. Member
 
Total Posts:  171
Joined:  2008-08-16
Odessa, Ukraine
 

local dir is searched before core dir in _incude_path_

so you can copy Controller_Front_Action there and change the behaviour of it..

 
Magento Community Magento Community
Magento Community
Magento Community
 
nico5
Sr. Member
 
Avatar
Total Posts:  214
Joined:  2008-02-19
France
 

@retif

Thank you, it works perfectly.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top