[buddypress-trac] [BuddyPress Trac] #7044: Emails: Passing an email address to `bp_send_mail()` does not render `{recipient.name}` token
buddypress-trac
noreply at wordpress.org
Mon May 2 22:34:02 UTC 2016
#7044: Emails: Passing an email address to `bp_send_mail()` does not render
`{recipient.name}` token
--------------------------+--------------------
Reporter: r-a-y | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.5.3
Component: API - Emails | Version: 2.5.0
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Description changed by r-a-y:
Old description:
> For the `bp_send_email()` function:
>
> If you pass a user ID:
>
> `bp_send_email( 'activity-at-message', 1, $args );`
>
> The `{{recipient.name}}` token will return the name of recipient.
>
> However, if you pass an email address:
>
> `bp_send_email( 'activity-at-message', 'test at example.com', $args );`
>
> The `{{recipient.name}}` token will be empty.
>
> Attached patch fixes this.
New description:
For the `bp_send_email()` function:
If you pass a user ID:
`bp_send_email( 'activity-at-message', 1, $args );`
The `{{recipient.name}}` token will return the name of recipient.
----
However, if you pass an email address of a valid WP user:
`bp_send_email( 'activity-at-message', 'test at example.com', $args );`
The `{{recipient.name}}` token will be empty.
Attached patch fixes this.
--
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7044#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list