Opened 10 years ago
Closed 10 years ago
#6873 closed regression (fixed)
Group notification email updates for bp_send_email() compatibility
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.5 | Priority: | high |
| Severity: | blocker | Version: | |
| Component: | Groups | Keywords: | has-patch |
| Cc: | dcavins |
Description
In the class BP_Email_Recipient, the recipient argument is checked strictly for is_int(). However, many of the user_ids returned by group functions are numeric strings, so BP_Email_Recipient fails.
Following is a list of the affected emails:
- email
groups-details-updatedingroups_notification_group_updated(). Recipient user_ids are provided byBP_Groups_Member::get_group_member_ids( $group->id )which returns those ids as numeric strings.
- email
groups-membership-requestingroups_notification_new_membership_request(). Recipient user_ids are provided bygroups_get_group_admins( $group_id )which returns those ids as numeric strings.
- emails
groups-membership-request-acceptedandgroups-membership-request-rejectedingroups_notification_membership_request_completed(). Recipient user_ids are provided byBP_Groups_Member->user_idwhich returns user_ids as numeric strings.
- emails
groups-member-promotedingroups_notification_promoted_member(). Recipient user_id is grabbed from an action variable, so is a string.
- email
groups-invitationingroups_notification_group_invites(). Recipient user_ids are provided byBP_Groups_Member->user_idwhich returns user_ids as numeric strings.
Additionally, there are a couple of token mismatches in the groups-invitation email.
Attachments (2)
Change History (6)
Note: See
TracTickets for help on using
tickets.
Good catches. Thanks for testing. As discussed on Slack, when you have a patch ready, feel free to commit!