- Posts: 2
- Thank you received: 0
Kunena 7.0.5 & Kunena 6.4.11 – Security Updates Released
The Kunena team has announce the arrival of Kunena 7.0.5 [K 7.0.5] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0.
The Kunena team is also pleased to announce the eleventh version of Kunena 6.4, a native Joomla extension for Joomla! 5.0, 5.1, 5.2, 5.3, 5.4 and 6.0.
Question Where to add,change redirect url after login?
1. In com_user\views\register\view.html.php
insert these lines somewhere before last line of code (parent::display($tpl)
// Get the return URL
if (!$url = JRequest::getVar('return', '', 'method', 'base64')) {
$url = base64_encode($params->get($type));
}
$this->assign('return', $url);
2. In com_user\views\register\tmpl\default.php add following line before last line of code (<?php echo JHTML::_( 'form.token' ); ?>):
<input type="hidden" name="return" value="<?php echo $this->return; ?>" />
3. In com_user\controller.php in method register_save() replace last line of code ($this->setRedirect('index.php', $message)
if ($return = JRequest::getVar('return', '', 'method', 'base64')) {
$return = base64_decode($return);
if (!JURI::isInternal($return)) {
$return = 'index.php';
}
}
$this->setRedirect($return, $message);
Atached zip archive with mentioned modified files.
Please Log in or Create an account to join the conversation.
//Start of modification
//nttranbao : add "&return=current-page" for Kunena to redirect to current page after log in
$loginlink = 'index.php?option=com_user&view=login' . $redirectUrl;
$logoutlink = 'index.php?option=com_user&view=login' . $redirectUrl;
$registerlink = 'index.php?option=com_user&view=register&Itemid=' . $Itemid ; // registerlink : we dont want it to redirect
$lostpasslink = 'index.php?option=com_user&view=reset&Itemid=' . $Itemid . $redirectUrl;
$loginlink = JRoute::_($loginlink);
$logoutlink = JRoute::_($logoutlink);
$registerlink = JRoute::_($registerlink);
$lostpasslink = JRoute::_($lostpasslink);
//Comment out/delete these 4 lines:
//$loginlink = JRoute::_('index.php?option=com_user&view=login');
//$logoutlink = JRoute::_('index.php?option=com_user&view=login');
//$registerlink = JRoute::_('index.php?option=com_user&view=register&Itemid=' . $Itemid);
//$lostpasslink = JRoute::_('index.php?option=com_user&view=reset&Itemid=' . $Itemid);
}
...
Wouldn't that make a nice-to-have feature in the next version of Kunena?
Please Log in or Create an account to join the conversation.
I run into the same "login redirection problem".
I've researched many of the suggested hacks and finally found this Joomla plugin, which seems to do the job (without hacking the code of Joomla or Kunena).
www.softwaresolutions.com.au/joomla-login-redirect.html
I only tested its basic functionality, so can't tell how robust it is.
Please Log in or Create an account to join the conversation.
I'll try this although I don't have this issues any more.
Would most likely suggest an upgrade to J!1.5.22 and K1.6.3 respectively.
Regards!
Vlad
It's a joke! It's a f***ing joke!! What's the matter with You!!??
Please Log in or Create an account to join the conversation.