Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

#1015 closed defect (bug) (fixed)

Opt out for new message notifications doesn't work (fix provided)

Reported by: rebootnow's profile rebootnow Owned by: apeatling's profile apeatling
Milestone: 1.1 Priority: major
Severity: Version:
Component: Keywords: has_patch
Cc: rebootnow

Description

Email notifications still get sent when a user opts out using the notification settings form. The bug is in the function that sends the mail, where there are two errors on the line that checks whether the user's 'notification_messages_new_message' setting == "no".

Around line 12 in file "bp-messages-notifications.php", in function "messages_notification_new_message", the line is currently:

if ( $message->sender_id == $recipient_ids[$i]
'no' == get_userdata( $recipient_ids[$i], 'notification-messages-new-message' ) ) continue;

That should be changed to read:

if ( $message->sender_id == $recipient_ids[$i]
'no' == get_usermeta( $recipient_ids[$i], 'notification_messages_new_message' ) ) continue;

The two changes:

  • call function get_usermeta instead of get_userdata
  • underscores instead of dashes in the metadata string

Change History (2)

#1 @DJPaul
15 years ago

  • Keywords has_patch added

#2 @apeatling
15 years ago

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

(In [1892]) Fixes #1015 props rebootnow

Note: See TracTickets for help on using tickets.