mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-04 05:25:01 +02:00
Merge branch 'develop-ascraeus' into develop
This commit is contained in:
commit
d9109355a3
phpBB
@ -1082,7 +1082,7 @@ class session
|
|||||||
*/
|
*/
|
||||||
function check_ban($user_id = false, $user_ips = false, $user_email = false, $return = false)
|
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'))
|
if (defined('IN_CHECK_BAN') || defined('SKIP_CHECK_BAN'))
|
||||||
{
|
{
|
||||||
@ -1196,6 +1196,20 @@ class session
|
|||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$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)
|
if ($banned && !$return)
|
||||||
{
|
{
|
||||||
global $template, $phpbb_root_path, $phpEx;
|
global $template, $phpbb_root_path, $phpEx;
|
||||||
|
@ -164,6 +164,22 @@ switch ($mode)
|
|||||||
|
|
||||||
$cookie_name = str_replace($config['cookie_name'] . '_', '', $cookie_name);
|
$cookie_name = str_replace($config['cookie_name'] . '_', '', $cookie_name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event to save custom cookies from deletion
|
||||||
|
*
|
||||||
|
* @event core.ucp_delete_cookies
|
||||||
|
* @var string cookie_name Cookie name to checking
|
||||||
|
* @var bool retain_cookie Do we retain our cookie or not, true if retain
|
||||||
|
* @since 3.1.3-RC1
|
||||||
|
*/
|
||||||
|
$retain_cookie = false;
|
||||||
|
$vars = array('cookie_name', 'retain_cookie');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_delete_cookies', compact($vars)));
|
||||||
|
if ($retain_cookie)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Polls are stored as {cookie_name}_poll_{topic_id}, cookie_name_ got removed, therefore checking for poll_
|
// Polls are stored as {cookie_name}_poll_{topic_id}, cookie_name_ got removed, therefore checking for poll_
|
||||||
if (strpos($cookie_name, 'poll_') !== 0)
|
if (strpos($cookie_name, 'poll_') !== 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user