aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-09-18 13:07:47 +0200
committerMarc Alexander <admin@m-a-styles.de>2016-09-18 13:07:47 +0200
commitc3578bc3e3837d961fd0ee9e22532a2e6f32ea51 (patch)
tree8b3886f8372454f1d1a1d1da48c03e11e5696745
parentbf397cb9853e83977edf5e173e149a228ac3117d (diff)
parent43c52b073bef287496b2caab7cb51aae9dcaaa01 (diff)
downloadforums-c3578bc3e3837d961fd0ee9e22532a2e6f32ea51.tar
forums-c3578bc3e3837d961fd0ee9e22532a2e6f32ea51.tar.gz
forums-c3578bc3e3837d961fd0ee9e22532a2e6f32ea51.tar.bz2
forums-c3578bc3e3837d961fd0ee9e22532a2e6f32ea51.tar.xz
forums-c3578bc3e3837d961fd0ee9e22532a2e6f32ea51.zip
Merge pull request #4442 from rxu/ticket/14781
[ticket/14781] Add core event to the function group_user_attributes()
-rw-r--r--phpBB/includes/functions_user.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 8a09f055bf..b82abe0c5e 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -3086,7 +3086,7 @@ function remove_default_rank($group_id, $user_ids)
*/
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)
{
- global $db, $auth, $phpbb_root_path, $phpEx, $config, $phpbb_container;
+ global $db, $auth, $phpbb_root_path, $phpEx, $config, $phpbb_container, $phpbb_dispatcher;
// We need both username and user_id info
$result = user_get_id_name($user_id_ary, $username_ary);
@@ -3217,6 +3217,28 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
break;
}
+ /**
+ * Event to perform additional actions on setting user group attributes
+ *
+ * @event core.user_set_group_attributes
+ * @var int group_id ID of the group
+ * @var string group_name Name of the group
+ * @var array user_id_ary IDs of the users to set group attributes
+ * @var array username_ary Names of the users to set group attributes
+ * @var array group_attributes Group attributes which were changed
+ * @var string action Action to perform over the group members
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'group_id',
+ 'group_name',
+ 'user_id_ary',
+ 'username_ary',
+ 'group_attributes',
+ 'action',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.user_set_group_attributes', compact($vars)));
+
// Clear permissions cache of relevant users
$auth->acl_clear_prefetch($user_id_ary);