wp/wp-activate.php
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
--- a/wp/wp-activate.php	Mon Jun 08 16:11:51 2015 +0000
+++ b/wp/wp-activate.php	Tue Jun 09 03:35:32 2015 +0200
@@ -27,7 +27,7 @@
 /**
  * Fires before the Site Activation page is loaded.
  *
- * @since 3.0
+ * @since 3.0.0
  */
 do_action( 'activate_header' );
 
@@ -40,7 +40,7 @@
     /**
      * Fires before the Site Activation page is loaded, but on the wp_head action.
      *
-     * @since 3.0
+     * @since 3.0.0
      */
     do_action( 'activate_wp_head' );
 }
@@ -84,7 +84,7 @@
 	<?php } else {
 
 		$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
-		$result = wpmu_activate_signup($key);
+		$result = wpmu_activate_signup( $key );
 		if ( is_wp_error($result) ) {
 			if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
 			    $signup = $result->get_error_data();
@@ -105,18 +105,17 @@
 			    echo '<p>'.$result->get_error_message().'</p>';
 			}
 		} else {
-			extract($result);
-			$url = get_blogaddress_by_id( (int) $blog_id);
-			$user = get_userdata( (int) $user_id);
+			$url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
+			$user = get_userdata( (int) $result['user_id'] );
 			?>
 			<h2><?php _e('Your account is now active!'); ?></h2>
 
 			<div id="signup-welcome">
 				<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>
 
-			<?php if ( $url != network_home_url('', 'http') ) : ?>
+			<?php if ( $url && $url != network_home_url( '', 'http' ) ) : ?>
 				<p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>'), $url, $url . 'wp-login.php' ); ?></p>
 			<?php else: ?>
 				<p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p>
@@ -129,4 +128,4 @@
 	var key_input = document.getElementById('key');
 	key_input && key_input.focus();
 </script>
-<?php get_footer(); ?>
+<?php get_footer();