#6913 closed defect (bug) (fixed)
BP_Email_Recipient::get_name() does not necessarly get the name for activation emails
Reported by: | imath | Owned by: | djpaul |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
When the user is not created yet: for sure on multisite and i think when BP_SIGNUPS_SKIP_USER_CREATION
is set to true for regular configs. The salutation used in the activation email looks like "Hi ,".
We could probably try to fetch the field_1
signup meta or simply avoid the white space by using a simple "Hi," :)
Attachments (1)
Change History (6)
#2
in reply to:
↑ 1
@
9 years ago
- Keywords has-patch added
Replying to 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.
#3
@
9 years ago
You're right that we can't use unit tests that set a constant, but your patch looks like a good idea
Per discussion in #6896, when we create a template function for the salutation, we can handle this there.