mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
3fdeb74e02
1 changed files with 23 additions and 1 deletions
|
@ -3020,7 +3020,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)
|
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $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
|
// We need both username and user_id info
|
||||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||||
|
@ -3152,6 +3152,28 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||||
break;
|
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
|
// Clear permissions cache of relevant users
|
||||||
$auth->acl_clear_prefetch($user_id_ary);
|
$auth->acl_clear_prefetch($user_id_ary);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue