From d4ace75370febea0f9a18ed2f744bee8caecedb2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 15 Mar 2012 21:00:20 +0100 Subject: [PATCH] [feature/events] Adding ledge group_user_del Used by phpBB Gallery PHPBB3-9550 --- phpBB/includes/functions_user.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 0e751ba890..a32f14e48f 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2955,7 +2955,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, */ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false) { - global $db, $auth, $config; + global $db, $auth, $config, $phpbb_dispatcher; if ($config['coppa_enable']) { @@ -3054,6 +3054,11 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, } unset($special_group_data); + $vars = array('group_id', 'user_id_ary', 'username_ary', 'group_name'); + $event = new phpbb_event_data(compact($vars)); + $phpbb_dispatcher->dispatch('core.group_user_del', $event); + extract($event->get_data_filtered($vars)); + $sql = 'DELETE FROM ' . USER_GROUP_TABLE . " WHERE group_id = $group_id AND " . $db->sql_in_set('user_id', $user_id_ary);