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 登录重定向回页面到上一页
基础教程推荐
- 如何替换eregi() 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
