From 771212f20ad52469b61a8c20107b7155241da0e1 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Thu, 7 Jul 2016 17:48:29 +0000 Subject: [PATCH] Multisite: Correct logic used to display an Edit User link after adding a user. Previously, if a user was added with the checkbox for no confirmation selected and an error was then encountered in `wpmu_activate_signup()`, a fatal error would trigger because `$new_user` was a `WP_Error` object rather than a user. Fixes #37223. Built from https://develop.svn.wordpress.org/trunk@38007 git-svn-id: http://core.svn.wordpress.org/trunk@37948 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/user-new.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php index 7b9a9eac51..14a6a63411 100644 --- a/wp-admin/user-new.php +++ b/wp-admin/user-new.php @@ -148,7 +148,7 @@ Please click the following link to confirm the invite: if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) { $key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $new_user_email ) ); $new_user = wpmu_activate_signup( $key ); - if ( ! is_wp_error( $new_user ) ) { + if ( is_wp_error( $new_user ) ) { $redirect = add_query_arg( array( 'update' => 'addnoconfirmation' ), 'user-new.php' ); } else { $redirect = add_query_arg( array( 'update' => 'addnoconfirmation', 'user_id' => $new_user['user_id'] ), 'user-new.php' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 5055e6086d..2f55c180cf 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-beta2-38006'; +$wp_version = '4.6-beta2-38007'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.