irislines web design
irislines web design

Posts Tagged ‘login’

Want users to stay on same page as login form?

As posted in the NE Joomla Users Group :

The issue is that Joomla seems to dump you back at the homepage after you log in, regardless of where you were.

Bill T. writes:

James: That patch for the login module is already in 1.5.15, so the
best thing to do is be sure your Joomla is current

Don: There is no com_login component, I assume you mean com_user,
which has it’s own component version of the login page. And the patch
James posted is for the module anyway. The component login page also
has redirection pages for successful login/logout.

So Doug: The module allows you to specify a specific page after login/
logout. Though the help text says the default is the home page, since
that patch was incorporated into Joomla, the default is actually the
current page.

FWIW – before this was changed in core, there was a way to solve this
without killing any kitties. You could get the same effect with a
template override.

Don posted :

It all depends where you’re having the issue. mod_login or com_login.

The mod_login issue was resolved long ago. The com_login was/is more complicated.

What’s funny is that I knew this sounded familiar b/c I posted messages in that thread (page 1 and 2 I think).

For mod_login –
Go to mod_login.
Login redirection page.
Leave the drop down to “select item”.

This way J! won’t redirect the user to any page. The fix was applied in J! 1.5.10.

For com_login
You can try the hack for now but that becomes a pain when updating Joomla.

James Foreman had posted this fix:

The following fix for the login page is not mine, but has worked in many cases… the topic on the joomla forums is at the following link. This is an issue for many joomla folks… so test this out and back things up, since I cannot guarantee it.

Login issue Forum page: http://forum.joomla.org/viewtopic.php?f=199&t=365252&start=60

———————-

Go to ‘your site’/modules/mod_login/helper.php

You will see an entry like this:

______________________________________

{
if($itemid = $params->get($type))
{
$menu =& JSite::getMenu();
$item = $menu->getItem($itemid);
$url = JRoute::_($item->link.’&Itemid=’.$itemid, false);
}
else
{
$url = JURI::base(true);
}

_____________________________________

change the “else” statement to this:

else
{
// stay on the same page
$uri = JFactory::getURI();
$url = $uri->toString(array(‘path’, ‘query’, ‘fragment’));
}

Thanks James!

IrisLines LLC
101 Washington Street
Brattleboro, VT 05301

802 257 7391

info@irislines.com