[buddypress-trac] [BuddyPress Trac] #9172: bp_user_has_opted_out() should return false if no email address is provided.

buddypress-trac noreply at wordpress.org
Thu Jun 6 21:34:36 UTC 2024


#9172: bp_user_has_opted_out() should return false if no email address is
provided.
--------------------------+----------------------
 Reporter:  dcavins       |       Owner:  dcavins
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  14.0.0
Component:  Emails        |     Version:  12.5.0
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |
--------------------------+----------------------
Changes (by dcavins):

 * owner:  (none) => dcavins
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"13909" 13909]:
 {{{
 #!CommitTicketReference repository="" revision="13909"
 Change bp_user_has_opted_out() behavior.

 Our function `bp_user_has_opted_out()` should return false if no email
 address is provided.

 The underlying issue is that if you pass no `where` filter arguments to
 `BP_Optout:: optout_exists()` (which uses `BP_Optout::get()`), you get
 every optout back, which is the wrong answer in this case.

 Props emeralive.

 Fixes #9172.
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9172#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list