aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorStanislav Atanasov <lucifer@anavaro.com>2015-05-31 15:05:13 +0300
committerStanislav Atanasov <lucifer@anavaro.com>2015-06-20 23:46:36 +0300
commitbbbf122d05ef77a2b03f2e092f6a0ebc2ca58ee1 (patch)
tree5c3224054ca1c43797a28b06bcba5f541e360446 /phpBB/phpbb
parent798490bf1d4d4e204d3458e86a6f8a0a8cd150c2 (diff)
downloadforums-bbbf122d05ef77a2b03f2e092f6a0ebc2ca58ee1.tar
forums-bbbf122d05ef77a2b03f2e092f6a0ebc2ca58ee1.tar.gz
forums-bbbf122d05ef77a2b03f2e092f6a0ebc2ca58ee1.tar.bz2
forums-bbbf122d05ef77a2b03f2e092f6a0ebc2ca58ee1.tar.xz
forums-bbbf122d05ef77a2b03f2e092f6a0ebc2ca58ee1.zip
[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
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/session.php26
1 files changed, 24 insertions, 2 deletions
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index f611b0900c..dab75666ac 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -913,6 +913,19 @@ class session
AND session_user_id = " . (int) $this->data['user_id'];
$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
$provider_collection = $phpbb_container->get('auth.provider_collection');
$provider = $provider_collection->get_provider();
@@ -1048,6 +1061,15 @@ class session
$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;
}
@@ -1550,11 +1572,11 @@ class session
$db->sql_query($sql);
/**
- * Event to send session information to extension
+ * Event to send update session information to extension
*
* @event core.update_session
* @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
*/
$vars = array('session_data', 'session_id');