[buddypress-trac] [BuddyPress Trac] #6913: BP_Email_Recipient::get_name() does not necessarly get the name for activation emails

buddypress-trac noreply at wordpress.org
Tue Feb 16 03:39:33 UTC 2016


#6913: BP_Email_Recipient::get_name() does not necessarly get the name for
activation emails
--------------------------+------------------
 Reporter:  imath         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.5
Component:  API           |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------
Changes (by imath):

 * keywords:   => has-patch


Comment:

 Replying to [comment:1 DJPaul]:
 > Per discussion in #6896, when we create a template function for the
 salutation, we can handle this there.

 That's what i thought too, but then just to be 100% sure i've built a
 specific unit test. It appears when `BP_SIGNUPS_SKIP_USER_CREATION` is
 true as the user is not created, `bp_core_signup_send_validation_email()`
 will fail sending the email.

 Then i thought how to deal with an empty `{{recipient.name}}` or remove
 the extra space between 'hi' and ',' when we cannot check if
 `{{recipient.name}}` is empty as it's a replacement token...

 So after digging in BP_Email_Recipient, i think i've found a way to use
 the user login as the `{{recipient.name}}` for signups when no user is
 created.

 6913.patch is fixing the 2 issues, although i'm not sure we can use the
 unit test as i'm defining `BP_SIGNUPS_SKIP_USER_CREATION` to true, it's
 there just to illustrate the problem.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6913#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list