Index: branches/unlabeled/unlabeled-1.71.2/core/units/users/users_event_handler.php =================================================================== diff -u -r7765 -r7828 --- branches/unlabeled/unlabeled-1.71.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 7765) +++ branches/unlabeled/unlabeled-1.71.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 7828) @@ -109,17 +109,25 @@ function OnSessionExpire() { - if( $this->Application->IsAdmin() ) { + if ($this->Application->IsAdmin()) { $this->Application->Redirect('index', Array('expired' => 1), '', 'index.php'); } - else { - $http_query =& $this->Application->recallObject('HTTPQuery'); - $get = $http_query->getRedirectParams(); - - $t = $this->Application->GetVar('t'); - $get['js_redirect'] = $this->Application->ConfigValue('UseJSRedirect'); - $this->Application->Redirect($t ? $t : 'index', $get); + + if ($this->Application->GetVar('admin') == 1) { + $session_admin =& $this->Application->recallObject('Session.admin'); + /* @var $session_admin Session */ + + if (!$session_admin->LoggedIn()) { + // front-end session created from admin session & both expired + $this->Application->DeleteVar('admin'); + $this->Application->Redirect('index', Array('expired' => 1), '', 'admin/index.php'); + } } + + $get = $this->Application->HttpQuery->getRedirectParams(); + $t = $this->Application->GetVar('t'); + $get['js_redirect'] = $this->Application->ConfigValue('UseJSRedirect'); + $this->Application->Redirect($t ? $t : 'index', $get); } /**