diff --git a/modules/mod_login/helper.php b/modules/mod_login/helper.php index 261b20389f3ce..34da96f5ea757 100644 --- a/modules/mod_login/helper.php +++ b/modules/mod_login/helper.php @@ -29,20 +29,20 @@ class ModLoginHelper */ public static function getReturnURL($params, $type) { - $app = JFactory::getApplication(); - $item = $app->getMenu()->getItem($params->get($type)); + $app = JFactory::getApplication(); + $item = $app->getMenu()->getItem($params->get($type)); if ($item) { - $vars = $item->query; + $url = 'index.php?Itemid=' . $item->id; } else { // Stay on the same page - $vars = $app::getRouter()->getVars(); + $url = JUri::getInstance()->toString(); } - return base64_encode('index.php?' . JUri::buildQuery($vars)); + return base64_encode($url); } /** diff --git a/modules/mod_login/mod_login.xml b/modules/mod_login/mod_login.xml index 9feaac13379bc..c0a3770d87f03 100644 --- a/modules/mod_login/mod_login.xml +++ b/modules/mod_login/mod_login.xml @@ -42,7 +42,7 @@