dolec Posted April 10, 2017 Share Posted April 10, 2017 I overrided customer class to set user inactive after registration but i want to redirect to some cms page with message. I found solutions to authcontrolller but they do not work - after registration i am redirected to main page of login or account creation beside the fact i changed redirects in authcontroller. Is this because of user is not logged in so the tools: redirect is not working? Link to comment Share on other sites More sharing options...
dolec Posted April 10, 2017 Author Share Posted April 10, 2017 (edited) i think i found solution. You dont need to change anything in authcontroller but change the code in FrontController.php of ps1.6 if (isset($_GET['logout']) || ($this->context->customer->logged && Customer::isBanned($this->context->customer->id))) { $this->context->customer->logout(); Tools::redirect('index.php?controller=cms&id_cms=6'); } so it will redirect to the page with message "the customer is still not activated by the admin" Edited April 10, 2017 by dolec (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted April 27, 2017 Share Posted April 27, 2017 You can do this by first logging out the customer and then redirecting him to the required cms page. $this->context->customer->logout(); Tools::redirect('my-account.php); or Tools::redirect('cms.php?id_cms=14'); <!-- @page { margin: 2cm } pre.cjk { font-family: "Droid Sans Fallback", monospace } p { margin-bottom: 0.25cm; line-height: 120% } --> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now