diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-26 11:22:44 -0500 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-26 11:22:44 -0500 |
commit | c260e82a9bc7961d17f2ac6698907f1a4ed392f2 (patch) | |
tree | 97af1cb3599cdb3de1929bb8cfd3a3cefe00dddf /phpBB/includes/functions_user.php | |
parent | e0ef10128b68cfae9774f6c87cc1a841cacecd8d (diff) | |
download | forums-c260e82a9bc7961d17f2ac6698907f1a4ed392f2.tar forums-c260e82a9bc7961d17f2ac6698907f1a4ed392f2.tar.gz forums-c260e82a9bc7961d17f2ac6698907f1a4ed392f2.tar.bz2 forums-c260e82a9bc7961d17f2ac6698907f1a4ed392f2.tar.xz forums-c260e82a9bc7961d17f2ac6698907f1a4ed392f2.zip |
[ticket/11744] Move notification from ucp_groups to group_user_add
PHPBB3-11744
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index c4d96e1773..102fbaae78 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2534,7 +2534,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; + global $db, $auth, $phpbb_container; // We need both username and user_id info $result = user_get_id_name($user_id_ary, $username_ary); @@ -2622,6 +2622,20 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, group_update_listings($group_id); + if ($pending) + { + $phpbb_notifications = $phpbb_container->get('notification_manager'); + + foreach ($add_id_ary as $user_id) + { + $phpbb_notifications->add_notifications('group_request', array( + 'group_id' => $group_id, + 'user_id' => $user_id, + 'group_name' => $group_name, + )); + } + } + // Return false - no error return false; } |