[ticket/17429] Adding event before users have been added to a group

PHPBB-17429
This commit is contained in:
Alexey Dolzhenko 2024-11-09 21:55:30 +07:00 committed by Marc Alexander
parent c7e68fb572
commit 5d0b1661f2
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -2759,6 +2759,26 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
return 'GROUP_USERS_EXIST';
}
/**
* Event before users are added to a group
*
* @event core.group_add_user_before
* @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.3.14
*/
$vars = array(
'group_id',
'group_name',
'user_id_ary',
'username_ary',
'pending',
);
extract($phpbb_dispatcher->trigger_event('core.group_add_user_before', compact($vars)));
$db->sql_transaction('begin');
// Insert the new users