#33358 closed defect (bug) (fixed)
Passwords: Second param of wp_new_user_notification() has been removed
Reported by: | ocean90 | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Users | Keywords: | has-patch commit |
Focuses: | Cc: |
Description (last modified by )
Originally reported by @Justin_K in ticket:33209:9.
In 4.2 wp_new_user_notification()
has a second param $plaintext_pass
. If it's not set the user won't get a notification, only the site admin. Now in trunk this param has been removed ([33023]) and the user get's always an email, see ticket:33209:9.
- @jeremyfelt: Maybe repurpose the second param as a flag for sending the notification instead of plain text? If empty don't send.
- This should have a changelog entry.
- @kraft:
wp_new_user_notification()
is still called with the second param: https://github.com/WordPress/WordPress/search?utf8=%E2%9C%93&q=wp_new_user_notification - (This is a pluggable function.)
Attachments (4)
Change History (20)
This ticket was mentioned in Slack in #core by obenland. View the logs.
9 years ago
#5
follow-up:
↓ 6
@
9 years ago
@ocean90 what's the thought behind 'both' ? Why not just have it be a boolean $email_user
flag?
#6
in reply to:
↑ 5
@
9 years ago
Replying to markjaquith:
@ocean90 what's the thought behind 'both' ? Why not just have it be a boolean
$email_user
flag?
Mainly because of this http://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#self-explanatory-flag-values-for-function-arguments.
I think we need to take a step back here first:
- Was it a good idea to change a pluggable function like this?
- Shouldn't we introduce a new function instead?
- If not, can we reuse the second param like we want to do or do we have to introduce a third one?
- Or can we change it to $args[] and do a type check?
- How are plugins using this function? (Thanks Helen for the list.)
#7
follow-up:
↓ 9
@
9 years ago
@ocean90 what other values would this param except as valid besides both
?
This ticket was mentioned in Slack in #core by obenland. View the logs.
9 years ago
#9
in reply to:
↑ 7
@
9 years ago
Replying to valendesigns:
@ocean90 what other values would this param except as valid besides
both
?
We could add 'admin'
as an alias for ''
(empty, which will skip the user e-mail). And then for back compat, any other non-empty value means 'both'
(as the patch currently does). Doing that now.
#10
follow-up:
↓ 11
@
9 years ago
There.
I'm also not worried about this being pluggable. Things overriding pluggable functions are on their own.
#11
in reply to:
↑ 10
@
9 years ago
We could add 'admin' as an alias for (empty, which will skip the user e-mail). And then for back compat, any other non-empty value means 'both' (as the patch currently does). Doing that now.
Sounds good to me.
I'm also not worried about this being pluggable. Things overriding pluggable functions are on their own.
I agree, you're on your own if you want to override pluggable functions.
This ticket was mentioned in Slack in #core by mark. View the logs.
9 years ago
#13
@
9 years ago
- Keywords commit added; needs-testing removed
Looks good to me. That's a hard argument to try to understand without having worked on this at all :)
Simple option — remove the calls.