We have moved to Github. Please open tickets there.

Opened 18 months ago

Closed 17 months ago

Last modified 16 months ago

#4208 closed Defect (fixed)

Make object notification consistent with users site membership

Reported by: fabcol Owned by:
Priority: normal Milestone: Elgg 1.8.3
Component: Core Version: 1.8.1
Severity: minor Keywords: multisite, notification, user
Cc: brett@… Difficulty: trivial

Description

Since 1.7, users membership is based on "member_of_site" relation ship.

In the function object_notification, a list of users interested in the object to be notified is loaded. As the 'site_guids' is set to the default value, only users whose site_guid is the current site will be loaded. This is not consistent with the 'member_of_site' membership behaviour, which allows users with different site_guids to be registered to the same object notification

Line 488
foreach ($NOTIFICATION_HANDLERS as $method => $foo) {

$interested_users = elgg_get_entities_from_relationship(array(

'relationship' => 'notify' . $method,
'relationship_guid' => $object->container_guid,
'inverse_relationship' => TRUE,
'types' => 'user',
'limit' => 99999

));

should be changed to

foreach ($NOTIFICATION_HANDLERS as $method => $foo) {

$interested_users = elgg_get_entities_from_relationship(array(

'site_guids' => ELGG_ENTITIES_ANY_VALUE,

'relationship' => 'notify' . $method,
'relationship_guid' => $object->container_guid,
'inverse_relationship' => TRUE,
'types' => 'user',
'limit' => 99999

));

Change History (3)

comment:1 Changed 17 months ago by cash

  • Difficulty set to trivial
  • Milestone changed from Needs Review to Elgg 1.8.3
  • Severity changed from major to minor

comment:2 Changed 17 months ago by cash

  • Resolution set to fixed
  • Status changed from new to closed

Fixes #4208 notifications do not use site guid

Changeset: 74a62bf4224e03827d6ba3ac80256be4f74d110b

comment:3 Changed 16 months ago by cash

Fixes #4208 notifications do not use site guid

Changeset: 74a62bf4224e03827d6ba3ac80256be4f74d110b

Note: See TracTickets for help on using tickets.