Passwords: Restore second parameter for wp_new_user_notification().
After [33023] users would always be notified, this restores previous behavior. Props markjaquith, ocean90. Fixes #33358. Built from https://develop.svn.wordpress.org/trunk@33620 git-svn-id: http://core.svn.wordpress.org/trunk@33587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -79,7 +79,7 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
|
||||
if ( false === $user_id )
|
||||
wp_die( __( 'There was an error creating the user.' ) );
|
||||
else
|
||||
wp_new_user_notification( $user_id, $password );
|
||||
wp_new_user_notification( $user_id, 'both' );
|
||||
}
|
||||
|
||||
$wpdb->hide_errors();
|
||||
|
||||
@@ -77,7 +77,7 @@ if ( $action ) {
|
||||
if ( false === $user_id ) {
|
||||
$update = 'err_new_dup';
|
||||
} else {
|
||||
wp_new_user_notification( $user_id, $password );
|
||||
wp_new_user_notification( $user_id, 'both' );
|
||||
add_user_to_blog( $id, $user_id, $_POST['new_role'] );
|
||||
$update = 'newuser';
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) {
|
||||
if ( ! $user_id ) {
|
||||
$add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) );
|
||||
} else {
|
||||
wp_new_user_notification( $user_id, $password );
|
||||
wp_new_user_notification( $user_id, 'both' );
|
||||
wp_redirect( add_query_arg( array('update' => 'added'), 'user-new.php' ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user