innocuous Posted November 16, 2012 Share Posted November 16, 2012 Hi, PS 1.5.2, default theme. Currently when a user logs in, it shows My account page. How can we change it so that they get redirected to homepage? Thanks Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted November 16, 2012 Share Posted November 16, 2012 look at controllers/front/AuthController.php see function: protected function processSubmitLogin() Here you would modify the redirect... Link to comment Share on other sites More sharing options...
Paulito Posted November 16, 2012 Share Posted November 16, 2012 Good morning, Thanks elaptron I wanted to know this too, I'm not a coder so what should I write to redirect to the home page Paul Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted November 16, 2012 Share Posted November 16, 2012 just find the redirect in that function...index.php?my-account...something like that... try just index.php just hack it and test it... hack away Link to comment Share on other sites More sharing options...
innocuous Posted November 17, 2012 Author Share Posted November 17, 2012 How would we do this with overrides? Currently /overrides/controllers/front/authcontroller.php has the following code: <?php class AuthController extends AuthControllerCore { } Do we need to replace the entire file with the original one and change code or enter only the changed code? Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted November 17, 2012 Share Posted November 17, 2012 Personally I would hack the file (back it up first)...test that the hack works then look at how to implement it...override or hook. Whenever possible use hook and avoid overrides. Link to comment Share on other sites More sharing options...
innocuous Posted November 19, 2012 Author Share Posted November 19, 2012 elpatron, I thought it was better to use override to ensure easy upgrades in future.. Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted November 19, 2012 Share Posted November 19, 2012 elpatron, I thought it was better to use override to ensure easy upgrades in future.. I'm not saying don't use them...but IMHO one should only use them as a last resort. Link to comment Share on other sites More sharing options...
innocuous Posted November 19, 2012 Author Share Posted November 19, 2012 hmmm...so I assume they fail sometimes or create problems? Learning PS so just curious Link to comment Share on other sites More sharing options...
Recommended Posts