mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/13817] Add session_kill and session_gc
Ticket was changed to add few more session related events core.session_kill - send user_id and session_id core.session_gc - just triger event PHPBB3-13817
This commit is contained in:
parent
798490bf1d
commit
bbbf122d05
1 changed files with 24 additions and 2 deletions
|
@ -913,6 +913,19 @@ class session
|
||||||
AND session_user_id = " . (int) $this->data['user_id'];
|
AND session_user_id = " . (int) $this->data['user_id'];
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event to send session kill information to extension
|
||||||
|
*
|
||||||
|
* @event core.session_kill
|
||||||
|
* @var int user_id user_id of the session user.
|
||||||
|
* @var string session_id current user's session_id
|
||||||
|
* @since 3.1.5-RC1
|
||||||
|
*/
|
||||||
|
$user_id = (int) $this->data['user_id'];
|
||||||
|
$session_id = $this->session_id;
|
||||||
|
$vars = array('user_id', 'session_id');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.session_kill', compact($vars)));
|
||||||
|
|
||||||
// Allow connecting logout with external auth method logout
|
// Allow connecting logout with external auth method logout
|
||||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||||
$provider = $provider_collection->get_provider();
|
$provider = $provider_collection->get_provider();
|
||||||
|
@ -1048,6 +1061,15 @@ class session
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event to trigger extension on session_gc
|
||||||
|
*
|
||||||
|
* @event core.session_gc
|
||||||
|
* @since 3.1.5-RC1
|
||||||
|
*/
|
||||||
|
$vars = array();
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.session_gc', compact($vars)));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1550,11 +1572,11 @@ class session
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event to send session information to extension
|
* Event to send update session information to extension
|
||||||
*
|
*
|
||||||
* @event core.update_session
|
* @event core.update_session
|
||||||
* @var array session_data Associative array of session keys to be updated
|
* @var array session_data Associative array of session keys to be updated
|
||||||
* @var array session_id current user's session_id
|
* @var string session_id current user's session_id
|
||||||
* @since 3.1.5-RC1
|
* @since 3.1.5-RC1
|
||||||
*/
|
*/
|
||||||
$vars = array('session_data', 'session_id');
|
$vars = array('session_data', 'session_id');
|
||||||
|
|
Loading…
Add table
Reference in a new issue