WordPress.org

Make WordPress Core

Changeset 38007


Ignore:
Timestamp:
07/07/2016 05:47:54 PM (4 years ago)
Author:
jeremyfelt
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/user-new.php

    r37914 r38007  
    149149                $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 ) );
    150150                $new_user = wpmu_activate_signup( $key );
    151                 if ( ! is_wp_error( $new_user ) ) {
     151                if ( is_wp_error( $new_user ) ) {
    152152                    $redirect = add_query_arg( array( 'update' => 'addnoconfirmation' ), 'user-new.php' );
    153153                } else {
Note: See TracChangeset for help on using the changeset viewer.