Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#4731 closed enhancement (fixed)

Include username in notification emails

Reported by: sooskriszta Owned by: sooskriszta
Milestone: 2.1 Priority: normal
Severity: normal Version: 1.0
Component: Core Keywords: has-patch
Cc: vivek@…, tw2113@…, tanner@…

Description

When a user registers as member, they are sent an account activation link in an email.

That email should also include the username.

In fact, all email notifications should include the username.

Attachments (4)

4731#.patch (1.0 KB) - added by sooskriszta 5 years ago.
Adds username in registration email
4731-2.diff (1.7 KB) - added by tanner m 5 years ago.
Updated the diff to include both MU and single site user registration. Also moved username within the translation function.
4731#.php (1012 bytes) - added by sooskriszta 5 years ago.
Updated patch - 29 Jul 2014
4731#.2.patch (1.0 KB) - added by sooskriszta 5 years ago.
Updated patch 2 - 29 Jul 2014

Download all attachments as: .zip

Change History (26)

#1 @DJPaul
7 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Type changed from defect (bug) to enhancement
  • Version changed from 1.6 to 1.0

#2 @sooskriszta
6 years ago

In 1.8 please? Shouldn't take more than 10 mts to edit code and upload patch (in my imagination) :-P

#3 @boonebgorges
6 years ago

It takes more than that, because we don't generate these emails in some cases - WP handles registration emails on Multisite. I'm not opposed to having this in 1.8, but someone will need to patch it, and I'm not sure I will have the time in the next 8 days.

#4 @sooskriszta
6 years ago

We don't have to worry about cases where WordPress handles the emails - WordPress typically does send out usernames in notification emails. The problem is only with the messages sent out by BuddyPress.

#5 @sooskriszta
6 years ago

Of all the tickets I have bumped today, this one is the most shameless, and for that I apologize. But really, really, really hope this simple to do but important to have bit is included in 1.9

#6 @sooskriszta
6 years ago

  • Cc vivek@… added

#8 @boonebgorges
6 years ago

  • Keywords needs-patch added

I'm not opposed, but it needs a patch.

#9 @sooskriszta
5 years ago

  • Milestone changed from Future Release to 2.1
  • Owner set to sooskriszta
  • Status changed from new to accepted

Which files are responsible for generating the mail content? I'll try to cook up a patch. Will need a bit of handholding.

#10 @boonebgorges
5 years ago

Email notifications are generated in a variety of places throughout BuddyPress. The registration emails are built in these functions: https://buddypress.trac.wordpress.org/browser/tags/2.0/bp-core/bp-core-filters.php#L295

#11 @tw2113
5 years ago

  • Cc tw2113@… added

@sooskriszta
5 years ago

Adds username in registration email

#12 @sooskriszta
5 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

#13 follow-up: @DJPaul
5 years ago

  • Keywords needs-patch added; has-patch needs-testing removed

Thanks for the patch, however the username will need to go inside the __() call to ensure the entire string can be translated properly (look at %1$s stuff we have in the string already; these are gettext placeholders).

#14 @tanner m
5 years ago

  • Cc tanner@… added

I'd be happy to help out with the patch here. Is there a reason that updating the default message is a better solution than using a filter in this case?

#15 @DJPaul
5 years ago

Because we can just change BuddyPress here, we don't need to filter to change our own code. :)

@tanner m
5 years ago

Updated the diff to include both MU and single site user registration. Also moved username within the translation function.

#16 in reply to: ↑ 13 @sooskriszta
5 years ago

Replying to DJPaul:

Thanks for the patch, however the username will need to go inside the __() call to ensure the entire string can be translated properly (look at %1$s stuff we have in the string already; these are gettext placeholders).

Ok. I thought __() stuff was just the stuff that needed translation and username doesn't. Anyway, attaching updating patch.

@sooskriszta
5 years ago

Updated patch - 29 Jul 2014

#17 @sooskriszta
5 years ago

  • Status changed from accepted to assigned

Argh! Didn't include file patch in previous.

@sooskriszta
5 years ago

Updated patch 2 - 29 Jul 2014

#18 @DJPaul
5 years ago

Thanks, this looks better (2.patch). Just wanted to check that the email needed those line breaks right at the start (we don't have those currently)?

#19 @sooskriszta
5 years ago

Included the breaks as they seemed appropriate...have used the username to address the user...

DJPaul,

Thanks for registering! To complete the activation of your account...

#20 @DJPaul
5 years ago

  • Keywords has-patch added; needs-patch removed

#21 @djpaul
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 8743:

Core: when sending the user registration email, include the user's name in the email.

It makes the email read a bit friendlier. :) Fixes #4731

#22 @DJPaul
5 years ago

I just realised I forgot to give sooskriszta props in the commit message. I am very sorry.

Note: See TracTickets for help on using tickets.