Changeset 941

Show
Ignore:
Timestamp:
03/28/07 13:22:00 (2 years ago)
Author:
donncha
Message:

Better handling of already activated accounts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-activate.php

    r940 r941  
    2626?> 
    2727<h2><?php _e('Activation Key Required') ?></h2> 
    28 <form name="activateform" id="activateform" method="post" action="<?php echo get_option( 'siteurl' ) ?>/wp-activate.php"> 
     28<form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php"> 
    2929<table border="0" width="100%" cellpadding="9"> 
    3030<tr> 
     
    4747        $result = wpmu_activate_signup($key); 
    4848        if ( is_wp_error($result) ) { 
    49                 if ( 'already_active' == $result->get_error_code() ) 
    50                         echo __('You have already activated your account. Please check your email inbox for your username, password, and login instructions.'); 
    51                 else  
     49                if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) { 
     50                        $signup = $result->get_error_data(); 
     51                        _e( '<h2>Your account is now active!</h2>' ); 
     52                        if( $signup->domain . $signup->path == '' ) { 
     53                                printf(__('<p class="lead-in">Your account has been activaed. You may now <a href="%1$s">login</a> to the site using your chosen username of "%2$s".  Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.</p>'), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 
     54                        } else { 
     55                                printf(__('<p class="lead-in">Your blog at <a href="%1$s">%2$s</a> is active. You may now login to your blog using your chosen username of "%3$s".  Please check your email inbox at %4$s for your password and login instructions.  If you do not receive an email, please check your junk or spam folder.  If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.</p>'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 
     56                        } 
     57                } else { 
    5258                        echo $result->get_error_message(); 
     59                } 
    5360        } else { 
    5461                extract($result); 
     
    5663                $user = new WP_User($user_id); 
    5764?> 
    58 <h2><?php _e('All set!'); ?></h2> 
     65<h2><?php _e('Your account is now active!'); ?></h2> 
    5966<table border="0" id="signup-welcome"> 
    6067<tr>