Eliminate use of `extract()` in `wp-activate.php`.

Props jeremyfelt, MikeHansenMe.
See #22400.


git-svn-id: https://develop.svn.wordpress.org/trunk@28373 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-05-13 03:13:21 +00:00
parent 961f52d367
commit b3ff5285f8
1 changed files with 4 additions and 5 deletions

View File

@ -84,7 +84,7 @@ get_header();
<?php } else { <?php } else {
$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key']; $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
$result = wpmu_activate_signup($key); $result = wpmu_activate_signup( $key );
if ( is_wp_error($result) ) { if ( is_wp_error($result) ) {
if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) { if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
$signup = $result->get_error_data(); $signup = $result->get_error_data();
@ -105,15 +105,14 @@ get_header();
echo '<p>'.$result->get_error_message().'</p>'; echo '<p>'.$result->get_error_message().'</p>';
} }
} else { } else {
extract($result); $url = get_blogaddress_by_id( (int) $result['blog_id'] );
$url = get_blogaddress_by_id( (int) $blog_id); $user = get_userdata( (int) $result['user_id'] );
$user = get_userdata( (int) $user_id);
?> ?>
<h2><?php _e('Your account is now active!'); ?></h2> <h2><?php _e('Your account is now active!'); ?></h2>
<div id="signup-welcome"> <div id="signup-welcome">
<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p> <p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p> <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $result['password']; ?></p>
</div> </div>
<?php if ( $url != network_home_url('', 'http') ) : ?> <?php if ( $url != network_home_url('', 'http') ) : ?>