#323 Login form does not redirect

v2.13
closed
5
2012-09-17
2005-09-28
Klug
No

When a full URL (to a file in the file module for
instance) is provided (by mail or other way) and the
user is not logged, GO sends him (the user) to the
login page.

But once authed, the login page does not redirect the
user to the initial URL...

Fix is simple, in file login_screens/Default/login.inc :
add a new line 12 : $form->innerHTML .= $input->get_html();

In other words, replace :
$input = new input('hidden', 'task', 'login');
$form->innerHTML .= $input->get_html();
if (isset($_REQUEST['return_to']))
{
$input = new input('hidden', 'return_to',
$_REQUEST['return_to']);
}

by

$input = new input('hidden', 'task', 'login');
$form->innerHTML .= $input->get_html();
if (isset($_REQUEST['return_to']))
{
$input = new input('hidden', 'return_to',
$_REQUEST['return_to']);
$form->innerHTML .= $input->get_html();
}

Discussion