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
This commit is contained in:
parent
24804144de
commit
771212f20a
|
@ -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' );
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue