aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-12-08 19:47:20 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-12-08 19:47:20 +0100
commit8ef8f49c9a98a33f811869986623bcfb2f592aae (patch)
tree16468ca7165f2b1974598338343c93edfcb14c46 /phpBB/includes/functions_user.php
parent9130f20cb650a8ea244cf258fd579d2b208be311 (diff)
parent81b3b38795749de43c563f7681f18e918902c34e (diff)
downloadforums-8ef8f49c9a98a33f811869986623bcfb2f592aae.tar
forums-8ef8f49c9a98a33f811869986623bcfb2f592aae.tar.gz
forums-8ef8f49c9a98a33f811869986623bcfb2f592aae.tar.bz2
forums-8ef8f49c9a98a33f811869986623bcfb2f592aae.tar.xz
forums-8ef8f49c9a98a33f811869986623bcfb2f592aae.zip
Merge branch '3.1.x'
* 3.1.x: [ticket/14213] Add pending to core.group_add_user_after [ticket/14213] Mv event group_add_user_after after cache cleaning [ticket/14213] Fix version number [ticket/14213] Adding missing reference to event dispatcher [ticket/14213] Adding event after users have been added to a group
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 7620cf1ff7..f462a5dafb 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2635,7 +2635,7 @@ function group_delete($group_id, $group_name = false)
*/
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)
{
- global $db, $auth, $user, $phpbb_container, $phpbb_log;
+ global $db, $auth, $user, $phpbb_container, $phpbb_log, $phpbb_dispatcher;;
// We need both username and user_id info
$result = user_get_id_name($user_id_ary, $username_ary);
@@ -2712,6 +2712,26 @@ function group_user_add($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 added to a group
+ *
+ * @event core.group_add_user_after
+ * @var int group_id ID of the group to which users are added
+ * @var string group_name Name of the group
+ * @var array user_id_ary IDs of the users which are added
+ * @var array username_ary names of the users which are added
+ * @var int pending Pending setting, 1 if user(s) added are pending
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'group_id',
+ 'group_name',
+ 'user_id_ary',
+ 'username_ary',
+ 'pending',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.group_add_user_after', compact($vars)));
+
if (!$group_name)
{
$group_name = get_group_name($group_id);