Redirect users to the page before after login with component

703 views Asked by At

In Joomla 3.5.1, I want to redirect users to the page they were before logging in.

If they login from mod_login, no problem, since the module is pending from the top menu, they just stay at that page.

The problem happens when the users login from the component: they are always redirected to the profile page.

In the menu item index.php?option=com_users&view=login there's an option to redirect users after login.

But how do I tell: "Get them back to the page they were before"?

Certain components are appending something like:

?return=L2YlQzMlQjNydW0tcGVyZ3VudGFzLWUtcmVzcG9zdGFzL2NvbnZlcnNhdGlvbi9yZWFkLmh0bWw/aWQ9MjU=

To the URL, requesting a redirect to a specific page.

But they alwawys go back to the profile page.

1

There are 1 answers

0
seguro On

return="XXXX"

The code appended to the return parameter is the base64_encoded value of the url which we need to redirect after login.

Check out below link for more details. https://docs.joomla.org/How_do_you_redirect_users_after_a_successful_login%3F