Skip to:
Content

BuddyPress.org

Ticket #9172: 9172.1.diff

File 9172.1.diff, 526 bytes (added by dcavins, 2 years ago)

If no email address parrameter is provided, bp_user_has_opted_out() should return false.

  • src/bp-core/bp-core-functions.php

    diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
    index 4b6a28c71..25c52f7b1 100644
    function bp_get_optouts( $args = array() ) {  
    47864786 * @return bool True if the user has opted out, false otherwise.
    47874787 */
    47884788function bp_user_has_opted_out( $email_address = '' ) {
     4789        if ( ! $email_address ) {
     4790                return false;
     4791        }
    47894792        $optout_class = new BP_Optout();
    47904793        $optout_id    = $optout_class->optout_exists(
    47914794                array(