problem with joomla login return url - Joomla! Forum - community, help and support
i have create button redirect page want redirect when user logged in if user not logged in user redirect log in page after log in user redirect previous page, have used small code doing such thing
$user =& jfactory::getuser();
if($user->id == 0)
{
$url = base64_encode(juri::current());
$link = jroute::_('index.php?option=com_users&view=login&return='.$url, false); //false make url non-xhtml
}
else
{
$link=jroute::_('index.php?option=com_efcmanager&view=joinclub&id='.$clubid);
}
but not worked me not know whats wrong code, when user redirect log in page , after logged in user redirect home page code want redirect previous page not on home page.
can 1 suggest me whats wrong code.
$user =& jfactory::getuser();
if($user->id == 0)
{
$url = base64_encode(juri::current());
$link = jroute::_('index.php?option=com_users&view=login&return='.$url, false); //false make url non-xhtml
}
else
{
$link=jroute::_('index.php?option=com_efcmanager&view=joinclub&id='.$clubid);
}
but not worked me not know whats wrong code, when user redirect log in page , after logged in user redirect home page code want redirect previous page not on home page.
can 1 suggest me whats wrong code.
problem redirect, because login form taking old index.php file not open if u put give correct username , password
Comments
Post a Comment