Jump to content

Registration redirect of inactive user


dolec

Recommended Posts

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

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 by dolec (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...