Joomla登录重定向回到上一页 [英] Joomla Login redirection back to page to the previous page

查看:92
本文介绍了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登录重定向回到上一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆