diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-01-06 10:48:14 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-01-06 10:48:14 +0100 |
commit | 6fd8f1b835bbbdb48a7f04e23f5718c528f6b245 (patch) | |
tree | be0702abc4757a75ceea99c9e1907f98e917eefb /phpBB/phpbb | |
parent | 2dab3c8c5251c7354f4b5061729c0eb543c9cdb0 (diff) | |
parent | 655d95002c3ea0289eb27a89ef33ddccefa247c3 (diff) | |
download | forums-6fd8f1b835bbbdb48a7f04e23f5718c528f6b245.tar forums-6fd8f1b835bbbdb48a7f04e23f5718c528f6b245.tar.gz forums-6fd8f1b835bbbdb48a7f04e23f5718c528f6b245.tar.bz2 forums-6fd8f1b835bbbdb48a7f04e23f5718c528f6b245.tar.xz forums-6fd8f1b835bbbdb48a7f04e23f5718c528f6b245.zip |
Merge pull request #3221 from MasterShredder/ticket/13422
[ticket/13422] New events for save custom cookies and set custom ban type
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/session.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index 691d0d5bef..0a6a18ffbe 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -1082,7 +1082,7 @@ class session */ function check_ban($user_id = false, $user_ips = false, $user_email = false, $return = false) { - global $config, $db; + global $config, $db, $phpbb_dispatcher; if (defined('IN_CHECK_BAN') || defined('SKIP_CHECK_BAN')) { @@ -1196,6 +1196,20 @@ class session } $db->sql_freeresult($result); + /** + * Event to set custom ban type + * + * @event core.session_set_custom_ban + * @var bool return If $return is false this routine does not return on finding a banned user, it outputs a relevant message and stops execution + * @var bool banned Check if user already banned + * @var array|false ban_row Ban data + * @var string ban_triggered_by Method that caused ban, can be your custom method + * @since 3.1.3-RC1 + */ + $ban_row = isset($ban_row) ? $ban_row : false; + $vars = array('return', 'banned', 'ban_row', 'ban_triggered_by'); + extract($phpbb_dispatcher->trigger_event('core.session_set_custom_ban', compact($vars))); + if ($banned && !$return) { global $template, $phpbb_root_path, $phpEx; |