Search code examples
phpmagentohttp-redirectauthenticationaccount

How to show Login Page after Logged in


How to show Log in Page after Logged in

After user Logged when user type url /customer/account/login/

Magento Will Redirect to /customer/account/ not show or load /customer/account/login/

i will try to When user open url /customer/account/login/ this session is destroy and login to new user

but my code are in log in page but they not load

How i can Disable Auto redirect for this

PS. i try to turn System > Configuration > Customers > Customer Configuration > Login Options to no but it not work


Solution

  • If you need to change in account controller in core magento, You just need to do the following 1) Edit the class file Mage_Customer_AccountController 2) Go the function loginAction 3) Comment the following lines

    if ($this->_getSession()->isLoggedIn()){$this->_redirect('//');return;}

    By doing this, you are editting the magento core. Otherwise you might need to create a custom module and rewrite the AccountController class which is more better.