aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/notification.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-04 16:49:38 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-04 16:49:38 +0000
commitd8d330a7c40975fce62e0fc6b5473ff6844f6384 (patch)
treee4b1d0d587c238d389733d2439d1e8f9d97fbae2 /engine/lib/notification.php
parent467d6a48a319955fe150d5f9895241ed3d70622b (diff)
downloadelgg-d8d330a7c40975fce62e0fc6b5473ff6844f6384.tar.gz
elgg-d8d330a7c40975fce62e0fc6b5473ff6844f6384.tar.bz2
Access improvements on granular notifications
git-svn-id: https://code.elgg.org/elgg/trunk@2649 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/notification.php')
-rw-r--r--engine/lib/notification.php29
1 files changed, 16 insertions, 13 deletions
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index de3c64bef..2d43d5e53 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -386,20 +386,23 @@
if (is_array($interested_users))
foreach($interested_users as $user) {
if ($user instanceof ElggUser) {
- $tmp = (array)get_user_notification_settings($guid);
- $methods = array();
- // TODO: get the specific method to contact each user with - for now just go with their prefs
- foreach($tmp as $k => $v)
- if ($v) {
-
- $methodstring = trigger_plugin_hook('notify:entity:message',$entity->getType(),array(
- 'entity' => $object,
- 'to_entity' => $user,
- 'method' => $v
- ),$string);
- notify_user($user->guid,$object->container_guid,$descr,$methodstring,NULL,array($v));
- }
+ if (in_array($object->access_id,get_access_list($user->guid))) {
+ $tmp = (array)get_user_notification_settings($guid);
+ $methods = array();
+
+ // TODO: get the specific method to contact each user with - for now just go with their prefs
+ foreach($tmp as $k => $v)
+ if ($v) {
+
+ $methodstring = trigger_plugin_hook('notify:entity:message',$entity->getType(),array(
+ 'entity' => $object,
+ 'to_entity' => $user,
+ 'method' => $v
+ ),$string);
+ notify_user($user->guid,$object->container_guid,$descr,$methodstring,NULL,array($v));
+ }
+ }
}
}
}