diff --git a/wp-activate.php b/wp-activate.php index 5954140960..df82ae0b09 100644 --- a/wp-activate.php +++ b/wp-activate.php @@ -135,10 +135,10 @@ get_header( 'wp-activate' ); get_error_code(), $valid_error_codes ) ) { - $signup = $result->get_error_data(); - ?> + } else { + if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) { + $signup = $result->get_error_data(); + ?>
'; @@ -162,17 +162,17 @@ get_header( 'wp-activate' ); ); } echo ''; - } elseif ( $result === null || is_wp_error( $result ) ) { - ?> + } elseif ( $result === null || is_wp_error( $result ) ) { + ?>get_error_message(); ?>
+ } else { + $url = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : ''; + $user = get_userdata( (int) $result['user_id'] ); + ?>