mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-02 20:19:27 +01:00
- dont update the session dla, for the xajax notifications query, as it
stops sessions from timing out - hook to be called when sessions get terminated
This commit is contained in:
parent
0587f0585d
commit
4db172a6c2
@ -342,7 +342,11 @@
|
|||||||
}
|
}
|
||||||
$GLOBALS['egw_info']['user']['kp3'] = $this->kp3;
|
$GLOBALS['egw_info']['user']['kp3'] = $this->kp3;
|
||||||
|
|
||||||
$this->update_dla();
|
// allow xajax / notifications to not update the dla, so sessions can time out again
|
||||||
|
if (!isset($GLOBALS['egw_info']['flags']['no_dla_update']) || !$GLOBALS['egw_info']['flags']['no_dla_update'])
|
||||||
|
{
|
||||||
|
$this->update_dla();
|
||||||
|
}
|
||||||
$this->account_id = $GLOBALS['egw']->accounts->name2id($this->account_lid,'account_lid','u');
|
$this->account_id = $GLOBALS['egw']->accounts->name2id($this->account_lid,'account_lid','u');
|
||||||
if (!$this->account_id)
|
if (!$this->account_id)
|
||||||
{
|
{
|
||||||
@ -1431,7 +1435,22 @@
|
|||||||
* @return bool did it suceed?
|
* @return bool did it suceed?
|
||||||
*/
|
*/
|
||||||
function destroy($sessionid, $kp3)
|
function destroy($sessionid, $kp3)
|
||||||
{}
|
{
|
||||||
|
if (!$sessionid && $kp3)
|
||||||
|
{
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
$this->log_access($this->sessionid); // log logout-time
|
||||||
|
|
||||||
|
error_log(__METHOD__."($sessionid,$kp3) parent::destroy()=$ret");
|
||||||
|
|
||||||
|
$GLOBALS['egw']->hooks->process(array(
|
||||||
|
'location' => 'session_destroyed',
|
||||||
|
'sessionid' => $sessionid,
|
||||||
|
),'',true); // true = run hooks from all apps, not just the ones the current user has perms to run
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Functions for appsession data and session cache
|
* Functions for appsession data and session cache
|
||||||
|
@ -133,13 +133,10 @@ class sessions extends sessions_
|
|||||||
|
|
||||||
function destroy($sessionid, $kp3)
|
function destroy($sessionid, $kp3)
|
||||||
{
|
{
|
||||||
if (!$sessionid && $kp3)
|
if (!parent::destroy($sessionid,$kp3))
|
||||||
{
|
{
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->log_access($this->sessionid); // log logout-time
|
|
||||||
|
|
||||||
// Only do the following, if where working with the current user
|
// Only do the following, if where working with the current user
|
||||||
if ($sessionid == $GLOBALS['egw_info']['user']['sessionid'])
|
if ($sessionid == $GLOBALS['egw_info']['user']['sessionid'])
|
||||||
{
|
{
|
||||||
|
@ -103,6 +103,7 @@ function doXMLHTTP()
|
|||||||
'disable_Template_class' => True,
|
'disable_Template_class' => True,
|
||||||
'autocreate_session_callback' => 'xajax_redirect',
|
'autocreate_session_callback' => 'xajax_redirect',
|
||||||
'no_exception_handler' => true, // we already installed our own
|
'no_exception_handler' => true, // we already installed our own
|
||||||
|
'no_dla_update' => $appName == 'notifications', // otherwise session never time out
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
include('./header.inc.php');
|
include('./header.inc.php');
|
||||||
|
Loading…
Reference in New Issue
Block a user