-1

I have created a Drupal 7 site. I need to redirect back a user after registration.

For example, if the users were visiting the front page before clicking on User login/register, they should be redirected to the front page after registering; if they were visiting the cart page, they should be redirected to the cart page.

0

Hope this will give you,

In Drupal 7, you can achieve it by using destination parameter.

Just add the destination parameter in the URL where you want to redirect it.

For example if you are in login page and after login if he want to redirect to some node say about-us page then

YOUR_DOMAIN/user/login?destination=about-us

Just add the destination parameter in "To create content, you must first log in" link. On click of this link it will redirect to User login page with the destination parameter. After login it will redirect to the path you have specified in the destination value.

0

Check this module , https://www.drupal.org/project/login_destination

You can set different paths and use custom php code in it's configuration to redirect after login/registration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.