1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-20 07:30:16 +01:00

[ticket/14119] Add core.user_unban

PHPBB3-14119
This commit is contained in:
Jakub Senko 2016-11-20 18:35:26 +01:00
parent dbd9c1f242
commit a03cec5b8d
No known key found for this signature in database
GPG Key ID: 6A7C328CD66EC21E

@ -1291,7 +1291,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
*/
function user_unban($mode, $ban)
{
global $db, $user, $auth, $cache;
global $db, $user, $auth, $cache, $phpbb_dispatcher;
// Delete stale bans
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
@ -1358,6 +1358,20 @@ function user_unban($mode, $ban)
add_log('user', $user_id, 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list);
}
}
/**
* Use this event to perform actions after the unban has been performed
*
* @event core.user_unban
* @var string mode One of the following: user, ip, email
* @var array user_ids_ary Array with user_ids
* @since 3.1.11-RC1
*/
$vars = array(
'mode',
'user_ids_ary',
);
extract($phpbb_dispatcher->trigger_event('core.user_unban', compact($vars)));
}
$cache->destroy('sql', BANLIST_TABLE);