Joomla Login redirection back to page to the previous page(Joomla 登录重定向回页面到上一页)
问题描述
我有某些页面需要用户登录 Joomla.当他们点击这些页面的链接时,一个登录框会出现在 iframe 叠加层中.一旦他们登录,我想将他们重定向回他们试图登录的页面,但是,Joomla 似乎只允许用户重定向到登录表单参数中预定义的页面.有没有办法在不完全入侵 Joomla 的情况下做到这一点.
I have certain pages that require to a user to be logged in Joomla. When they click on the links to those pages a login box appears in an iframe overlay. Once they login, I want to redirect them back to the page they were trying to login to, however, Joomla seems to only allow a user to be redirected to a page that is predefined in the login form parameters. Is there a way to do this without completely hacking Joomla.
如果没有,有没有人有关于如何以简单的方式破解这个的建议.
If not, does anyone have a recommendation on how to hack this an easy way.
推荐答案
你可以用like
$return = JURI::getInstance()->toString();
$url = 'index.php?option=com_user&view=login';
$url .= '&return='.base64_encode($return);
$this->setRedirect($url, XiText::_('YOU_MUST_LOGIN_FIRST')); // if you are in controller
or
JFactory::getApplication()->redirect($url, XiText::_('YOU_MUST_LOGIN_FIRST'));
这篇关于Joomla 登录重定向回页面到上一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Joomla 登录重定向回页面到上一页
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- Laravel 仓库 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
