[buddypress-trac] [BuddyPress] #1015: Opt out for new message notifications doesn't work (fix provided)
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Wed Sep 16 01:46:58 UTC 2009
#1015: Opt out for new message notifications doesn't work (fix provided)
----------------------+-----------------------------------------------------
Reporter: rebootnow | Owner: apeatling
Type: defect | Status: new
Priority: major | Milestone: 1.1
Keywords: |
----------------------+-----------------------------------------------------
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
--
Ticket URL: <http://trac.buddypress.org/ticket/1015>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list