Jump to content

Redirect customer group after login


SoulOfBeast

Recommended Posts

Hi everyone,

 

Recently I've tried to redirect one specific group of customers to specific page after login but it's not working, I guess it's something related to AuthController.php but i can't find where.

 

I tried to change this line but it's not working :

Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));

 

For example, I want the idgroup 4 go to specific page after login and the rest of the groups go to 'my-account', it is possible?

Do you guys have any ideas?

Thanks.

 

Link to comment
Share on other sites

it could be some module hijacked the redirection.

if any module hook to "actionAuthentication" and does any redirection, then your redirection in AuthController.php may not work depends on there the your redirection code is.

 

 

You can try your redirection before following line to see if it works or not.

 

                Hook::exec('actionAuthentication', array('customer' => $this->context->customer));
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...