[英]Redirect users to the page before after login with component
In Joomla 3.5.1, I want to redirect users to the page they were before logging in. 在Joomla 3.5.1中,我想将用户重定向到他们登录之前的页面。
If they login from mod_login, no problem, since the module is pending from the top menu, they just stay at that page. 如果他们从mod_login登录,那没问题,因为该模块在顶部菜单中处于挂起状态,因此它们只停留在该页面上。
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. 在菜单项index.php?option=com_users&view=login
有一个选项用于在登录后重定向用户。
But how do I tell: "Get them back to the page they were before"
? 但是,我怎么知道: "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. 对于URL,请求重定向到特定页面。
But they alwawys go back to the profile page. 但是他们总是回到个人资料页面。
return="XXXX" return =“ XXXX”
The code appended to the return parameter is the base64_encoded value of the url which we need to redirect after login. 返回参数后面的代码是该URL的base64_encoded值,我们需要在登录后将其重定向。
Check out below link for more details. 请查看以下链接以获取更多详细信息。 https://docs.joomla.org/How_do_you_redirect_users_after_a_successful_login%3F https://docs.joomla.org/How_do_you_redirect_users_after_a_successful_login%3F
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.