Skip to:
Content

BuddyPress.org

Changeset 13908


Ignore:
Timestamp:
06/06/2024 09:34:20 PM (6 months ago)
Author:
dcavins
Message:

Make sure to pass an email address to bp_user_has_opted_out().

In bp_email_unsubscribe_handler() we missed passing the incoming email to bp_user_has_opted_out().
It's hard to figure out whether a user has opted out if you don't check the user's email address.

Props emeralive.

Fixes #9171.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-functions.php

    r13898 r13908  
    44484448    } else if ( $raw_user_email ) {
    44494449        // Unsubscribe.
    4450         if ( bp_user_has_opted_out() ) {
     4450        if ( bp_user_has_opted_out( $raw_user_email ) ) {
    44514451            $result_msg = $emails[ $raw_email_type ]['unsubscribe']['message'];
    44524452            $unsub_msg  = __( 'You have already unsubscribed from all communication from this site.', 'buddypress' );
Note: See TracChangeset for help on using the changeset viewer.