[wp-trac] [WordPress Trac] #34377: Another unexpected break in behavior for wp_new_user_notification()
WordPress Trac
noreply at wordpress.org
Tue Oct 20 23:08:14 UTC 2015
#34377: Another unexpected break in behavior for wp_new_user_notification()
-----------------------------+-----------------------
Reporter: danielbachhuber | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.3.2
Component: Users | Version:
Severity: normal | Keywords: has-patch
Focuses: |
-----------------------------+-----------------------
`wp_new_user_notification()` originally sent two emails if `$password` was
provided: one to the admin, and another to the created user.
r33620 "restored" this behavior, but then r34116 disabled this behavior
because the deprecated `$password` argument isn't checked in this
conditional:
{{{
if ( 'admin' === $notify || empty( $notify ) ) {
return;
}
}}}
If `$password` is provided, I'd expect the conditional to fail.
I think that `$notify` could default to 'both', in which case `empty(
$notify )` could just be removed.
Discovered in https://github.com/wp-cli/wp-cli/pull/2163
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34377>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list