diff options
author | Stanislav Atanasov <lucifer@anavaro.com> | 2015-05-05 01:50:10 +0300 |
---|---|---|
committer | Stanislav Atanasov <lucifer@anavaro.com> | 2015-06-20 23:46:36 +0300 |
commit | 4a1f617473c982af4c25fe23a42ea544d5e95c78 (patch) | |
tree | fb613d91fdc0ac2a23fecc8d53d35b6714753732 /phpBB/phpbb/session.php | |
parent | da7b24449d1767e4afec653399aaf2c0db4524a5 (diff) | |
download | forums-4a1f617473c982af4c25fe23a42ea544d5e95c78.tar forums-4a1f617473c982af4c25fe23a42ea544d5e95c78.tar.gz forums-4a1f617473c982af4c25fe23a42ea544d5e95c78.tar.bz2 forums-4a1f617473c982af4c25fe23a42ea544d5e95c78.tar.xz forums-4a1f617473c982af4c25fe23a42ea544d5e95c78.zip |
[ticket/13817] Add core.update_session event
Add core.update_session event in \phpbb\session.php
PHPBB3-13817
Diffstat (limited to 'phpBB/phpbb/session.php')
-rw-r--r-- | phpBB/phpbb/session.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index bedd581725..1a15e171c4 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -1541,12 +1541,23 @@ class session */ public function update_session($session_data, $session_id = null) { - global $db; + global $db, $phpbb_dispatcher; $session_id = ($session_id) ? $session_id : $this->session_id; $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $session_data) . " WHERE session_id = '" . $db->sql_escape($session_id) . "'"; $db->sql_query($sql); + + /** + * Event to send 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 + * @since 3.1.4 + */ + $vars = array('session_data', 'session_id'); + extract($phpbb_dispatcher->trigger_event('core.update_session', compact($vars))); } } |