[wp-trac] [WordPress Trac] #37742: wp_update_user anyway sending email even user password did not change

WordPress Trac noreply at wordpress.org
Fri Aug 19 21:31:45 UTC 2016


#37742: wp_update_user anyway sending email even user password did not change
--------------------------+------------------------------
 Reporter:  librapan      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:  4.6
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  administration
--------------------------+------------------------------

Comment (by librapan):

 I would suggest change line 1758 from
 {{{
 $send_password_change_email = apply_filters( 'send_password_change_email',
 true, $user, $userdata );
 }}}

 to
 {{{
 if ($userdata['user_pass'] !== $user_obj->user_pass) {
     $send_password_change_email = apply_filters(
 'send_password_change_email', true, $user, $userdata );
 }
 }}}

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


More information about the wp-trac mailing list