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:
parent
dbd9c1f242
commit
a03cec5b8d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user