From a11d97cb36eb427430d53b49018a870d39cae618 Mon Sep 17 00:00:00 2001 From: Wardormeur Date: Sun, 4 Oct 2015 19:33:46 +0200 Subject: [ticket/14212] Adding event after users have been removed to a group The idea is to be able to map with others CMS by exposing most commons user configuration & changes. Difference between the event before and after group belonging removal is that users belongs to multiple groups, so that the belonging into a group also depends on the others groups (and not only the deleted one), which is not reflected before as the user is not yet deleted PHPBB-14212 --- phpBB/includes/functions_user.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index c46653db9e..b1509c22d0 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2933,6 +2933,19 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, // Clear permissions cache of relevant users $auth->acl_clear_prefetch($user_id_ary); + /** + * Event after users are removed from a group + * + * @event core.group_delete_user_after + * @var int group_id ID of the group from which users are deleted + * @var string group_name Name of the group + * @var array user_id_ary IDs of the users which are removed + * @var array username_ary names of the users which are removed + * @since 3.7 + */ + $vars = array('group_id', 'group_name', 'user_id_ary', 'username_ary'); + extract($phpbb_dispatcher->trigger_event('core.group_delete_user_after', compact($vars))); + if (!$group_name) { $group_name = get_group_name($group_id); -- cgit v1.2.1 From bf0596d0a1d7a4da54f5b6cf1c9af8b1d0b5958b Mon Sep 17 00:00:00 2001 From: Wardormeur Date: Tue, 6 Oct 2015 08:54:48 +0200 Subject: [ticket/14212] Fix version number for core.group_delete_user_after event PHPBB-14212 --- phpBB/includes/functions_user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index b1509c22d0..fe370750d9 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2941,7 +2941,7 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, * @var string group_name Name of the group * @var array user_id_ary IDs of the users which are removed * @var array username_ary names of the users which are removed - * @since 3.7 + * @since 3.1.7-RC1 */ $vars = array('group_id', 'group_name', 'user_id_ary', 'username_ary'); extract($phpbb_dispatcher->trigger_event('core.group_delete_user_after', compact($vars))); -- cgit v1.2.1