Opened 2 years ago
Closed 2 years ago
#9172 closed defect (bug) (fixed)
bp_user_has_opted_out() should return false if no email address is provided.
| Reported by: | dcavins | Owned by: | dcavins |
|---|---|---|---|
| Priority: | normal | Milestone: | 14.0.0 |
| Component: | Emails | Version: | 12.5.0 |
| Severity: | normal | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
If no email address parrameter is provided, bp_user_has_opted_out() should return false.