Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5466 closed defect (bug) (fixed)

bp_core_filter_user_welcome_email() should not run in the admin

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: boonebgorges's profile boonebgorges
Milestone: 2.0 Priority: normal
Severity: normal Version: 1.7
Component: Core Keywords: has-patch
Cc: james@…

Description

The function was introduced in [2773] and moved to a separate file in [2832].

The function description says that it will not fire when a user is registered by the site admin:
tags/1.9.2/bp-core/bp-core-filters.php#L196

However, that is no longer true since [6439], where the is_admin() check was removed (without any clarification in the commit message). See the support thread that led to this ticket.

The same applies to bp_core_filter_blog_welcome_email().

Attachments (1)

5466.patch (938 bytes) - added by SergeyBiryukov 10 years ago.

Download all attachments as: .zip

Change History (6)

#1 @xjamesb
10 years ago

  • Cc james@… added

#2 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 2.0

This looks correct to me. My guess is that the is_admin() check was removed from the global scope, with the intention of moving it into the function scope as in 5466.patch, but it was forgotten about. Thanks for the research and the patch.

#3 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 8137:

Don't swap '[User Set]' into welcome emails when accounts are created in the Dashboard

This is incorrect behavior, because when the emails are created when is_admin(),
the password is not set by the user.

The is_admin() exception was mistakenly removed in r6439.

Fixes #5466

Props SergeyBiryukov

#4 @xjamesb
10 years ago

Thank you for this great support. I have patched my site. I would like to close the thread on the WordPress support forum.

  • Which release of BuddyPress will this fix appear in?
  • When will this release appear?

#5 @boonebgorges
10 years ago

Hi xjamesb - The fix will appear in BP 2.0, which is currently scheduled for April 16, 2014.

Note: See TracTickets for help on using tickets.