Make WordPress Core


Ignore:
Timestamp:
09/14/2015 01:02:03 PM (9 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.

Merge of [34116] to the 4.3 branch.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.3/src/wp-admin/network/user-new.php

    r33620 r34118  
    5252            $add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) );
    5353        } else {
    54             wp_new_user_notification( $user_id, 'both' );
     54            wp_new_user_notification( $user_id, null, 'both' );
    5555            wp_redirect( add_query_arg( array('update' => 'added'), 'user-new.php' ) );
    5656            exit;
Note: See TracChangeset for help on using the changeset viewer.