Opened 21 months ago
Closed 21 months ago
#9172 closed defect (bug) (fixed)
bp_user_has_opted_out() should return false if no email address is provided.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 14.0.0 | Priority: | normal |
| Severity: | normal | Version: | 12.5.0 |
| Component: | Emails | Keywords: | has-patch |
| Cc: |
Description
bp_user_has_opted_out() uses BP_Optout::optout_exists() internally, but if no where parameters are provided, BP_Optout::get() returns every optout, as you might expect.
This is weird behavior for bp_user_has_opted_out(), though (and for optout_exists, truthfully). We prevent this issue in bp_add_optout() by ensuring that the email address parameter is not empty, so we could add a similar check in bp_user_has_opted_out().
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
If no email address parrameter is provided, bp_user_has_opted_out() should return false.