mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
remember the login referer. That allows us to redirect to this page, after login the user out.
This commit is contained in:
parent
f01ec5bd3f
commit
74b9b2c9fa
@ -306,6 +306,12 @@
|
||||
list($forward,$extra_vars) = explode('?',$forward,2);
|
||||
}
|
||||
|
||||
if(strpos($_SERVER['HTTP_REFERER'], $_SERVER['REQUEST_URI']) === false) {
|
||||
// login requuest does not come from login.php
|
||||
// redirect to referer on logout
|
||||
$GLOBALS['egw']->session->appsession('referer', 'login', $_SERVER['HTTP_REFERER']);
|
||||
}
|
||||
|
||||
// Check for save passwd
|
||||
if($GLOBALS['egw_info']['server']['check_save_passwd'] && $GLOBALS['egw']->acl->check('changepassword', 1, 'preferences') && $unsave_msg = $GLOBALS['egw']->auth->crackcheck($passwd))
|
||||
{
|
||||
|
@ -26,6 +26,11 @@
|
||||
$GLOBALS['kp3'] = get_var('kp3',array('GET','COOKIE'));
|
||||
|
||||
$verified = $GLOBALS['egw']->session->verify();
|
||||
|
||||
if(!$redirectTarget = $GLOBALS['egw']->session->appsession('referer', 'login')) {
|
||||
$redirectTarget = $GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=1&domain='.$GLOBALS['egw_info']['user']['domain'];
|
||||
}
|
||||
|
||||
if ($verified)
|
||||
{
|
||||
if (file_exists($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']))
|
||||
@ -63,6 +68,6 @@
|
||||
{
|
||||
$GLOBALS['egw']->session->phpgw_setcookie(EGW_PHPSESSID);
|
||||
}
|
||||
|
||||
$GLOBALS['egw']->redirect($GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=1&domain='.$GLOBALS['egw_info']['user']['domain']);
|
||||
|
||||
$GLOBALS['egw']->redirect($redirectTarget);
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user