[buddypress-trac] [BuddyPress Trac] #6915: BP Email template: the unsubscribe link & the account activation email
buddypress-trac
noreply at wordpress.org
Tue Feb 16 20:47:47 UTC 2016
#6915: BP Email template: the unsubscribe link & the account activation email
--------------------------+------------------
Reporter: imath | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.5
Component: API | Version:
Severity: normal | Resolution:
Keywords: dev-feedback |
--------------------------+------------------
Comment (by r-a-y):
Attached patch passes the the 'To' email info into the email template for
checking so we can determine if the "Unsubscribe" link should show in
emails.
I had to move the `'to'` parameter higher up to the `bp_get_email()`
function and I had to stash the paramater in the `buddypress()` object in
order so we can access this info in the email template. Yeah, I know...
To determine if a user should see the "Unsubscribe" link, I created an
email template function called `bp_email_is_recipient_to_singular_user()`
(pardon the crappy name for now!). In this function, I'm using
`bp_is_user_active()`, which I've patched to determine if a user is
pending as well.
If we like this technique, we could move the tokens to `bp_get_email()` as
well so we could potentially do other checks in the email template.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6915#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list