diff options
author | brunoais <brunoaiss@gmail.com> | 2014-12-17 15:17:44 +0000 |
---|---|---|
committer | brunoais <brunoaiss@gmail.com> | 2014-12-17 15:17:44 +0000 |
commit | 7512efed9e440fe7be55c3882c694f2b10ce16eb (patch) | |
tree | ef5f16c4eb3dd6acc35fedca9b9c3d98932aee45 /phpBB | |
parent | 70483d60886ad416c3dd40f29e1128e031322e1e (diff) | |
download | forums-7512efed9e440fe7be55c3882c694f2b10ce16eb.tar forums-7512efed9e440fe7be55c3882c694f2b10ce16eb.tar.gz forums-7512efed9e440fe7be55c3882c694f2b10ce16eb.tar.bz2 forums-7512efed9e440fe7be55c3882c694f2b10ce16eb.tar.xz forums-7512efed9e440fe7be55c3882c694f2b10ce16eb.zip |
[ticket/13154] Allow filtering the list of users to be notified
PHPBB3-13154
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/phpbb/notification/manager.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php index dd611e1dd1..e8cfae9b53 100644 --- a/phpBB/phpbb/notification/manager.php +++ b/phpBB/phpbb/notification/manager.php @@ -350,6 +350,26 @@ class manager // find out which users want to receive this type of notification $notify_users = $this->get_item_type_class($notification_type_name)->find_users_for_notification($data, $options); + /** + * Allow filtering the notify_users array for a notification that is about to be sent. + * Here, $notify_users is already filtered by f_read and the ignored list included in the options variable + * + * @event core.notification_manager_add_notifications + * @var string notification_type_name The forum id from where the topic belongs + * @var array data Data specific for the notification_type_name used will be inserted + * @var array notify_users The array of userid that are going to be notified for this notification. Set to array() to cancel. + * @var array options The options that were used when this method was called (read only) + * + * @since 3.1.3-RC1 + */ + $vars = array( + 'notification_type_name', + 'data', + 'notify_users', + 'options', + ); + extract($phpbb_dispatcher->trigger_event('core.notification_manager_add_notifications', compact($vars))); + $this->add_notifications_for_users($notification_type_name, $data, $notify_users); return $notify_users; |