[wp-trac] [WordPress Trac] #33587: Notification Functions Should be Replaced by Hooks

WordPress Trac noreply at wordpress.org
Tue Sep 15 21:05:53 UTC 2015


#33587: Notification Functions Should be Replaced by Hooks
-----------------------------------+------------------
 Reporter:  dshanske               |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  4.4
Component:  Mail                   |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------

Comment (by boonebgorges):

 Replying to [comment:26 dshanske]:
 > Both seem like they would create problems. The first in terms of
 complexity, the second in terms of usage.
 >
 > Maybe the question is... what is the current logic that sends out the
 notifications? Why do some new users get notified, and others don't?

 Different notifications are sent depending on context. For example, on
 multisite with open registration, users are created when a signup is
 activated. But then the new user gets a "your account has been activated"
 message, not the standard "new user" message.

 More generally, there are countless plugins etc that create users
 programatically, either directly through `wp_insert_user()`, or using a
 wrapper like `wp_create_user()` or `wpmu_create_user()`. They have come to
 expect that notifications will not be sent. We can't change this behavior.

 The more I think about it, the more I think [attachment:33587.5.diff] is
 the way to go. The new hooks are somewhat wonky, but no more wonky than
 the fact that we were manually calling the email notification functions at
 this point. Speak now or forever hold your peace.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33587#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list