Make WordPress Core


Ignore:
Timestamp:
09/14/2015 12:42:34 PM (10 years ago)
Author:
ocean90
Message:

Passwords: Deprecate second parameter of wp_new_user_notification().

The second parameter $plaintext_pass was removed in [33023] and restored as $notify in [33620] with a different behavior. If you have a plugin overriding wp_new_user_notification() which hasn't been updated you would get a notification with your username and the password "both".
To prevent this the second parameter is now deprecated and reintroduced as the third parameter.

Adds unit tests.

Props kraftbj, adamsilverstein, welcher, ocean90.
Fixes #33654.

(Don't ask for new pluggables kthxbye)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-users.php

    r33921 r34116  
    7878                    $update = 'err_new_dup';
    7979                } else {
    80                     wp_new_user_notification( $user_id, 'both' );
     80                    wp_new_user_notification( $user_id, null, 'both' );
    8181                    add_user_to_blog( $id, $user_id, $_POST['new_role'] );
    8282                    $update = 'newuser';
Note: See TracChangeset for help on using the changeset viewer.