Changeset 940

Show
Ignore:
Timestamp:
03/28/07 12:30:58 (2 years ago)
Author:
donncha
Message:

Better text when user account is created

Files:

Legend:

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

    r866 r940  
    33require ('wp-config.php'); 
    44require_once( ABSPATH . WPINC . '/registration.php'); 
    5  
    65 
    76do_action("activate_header"); 
     
    2423</style> 
    2524<?php 
    26        if ( empty($_GET['key']) && empty($_POST['key']) ) { 
     25if ( empty($_GET['key']) && empty($_POST['key']) ) { 
    2726?> 
    2827<h2><?php _e('Activation Key Required') ?></h2> 
     
    4039</form> 
    4140<?php 
     41} else { 
     42        if ( ! empty($_GET['key']) ) 
     43                $key = $_GET['key']; 
     44        else 
     45                $key = $_POST['key']; 
     46 
     47        $result = wpmu_activate_signup($key); 
     48        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  
     52                        echo $result->get_error_message(); 
    4253        } else { 
    43                 if ( ! empty($_GET['key']) ) 
    44                         $key = $_GET['key']; 
    45                 else 
    46                         $key = $_POST['key']; 
    47                          
    48                 $result = wpmu_activate_signup($key); 
    49                 if ( is_wp_error($result) ) { 
    50                         if ( 'already_active' == $result->get_error_code() ) 
    51                                 echo __('The blog is already active.  Please check your email inbox for your username, password, and login instructions.'); 
    52                         else  
    53                                 echo $result->get_error_message(); 
    54                 } else { 
    55                         extract($result); 
    56                         $url = get_blogaddress_by_id($blog_id); 
    57                         $user = new WP_User($user_id); 
     54                extract($result); 
     55                $url = get_blogaddress_by_id($blog_id); 
     56                $user = new WP_User($user_id); 
    5857?> 
    5958<h2><?php _e('All set!'); ?></h2> 
     
    6968</tr> 
    7069</table> 
    71 <h3 class="view"><?php printf(__('<a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></h3> 
    72 <?php 
     70                <?php if( $url != 'http://' . $current_site->domain . $current_site->path ) { ?> 
     71<p class="view"><?php printf(__('Your account is now activate. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p> <?php  
     72                } else {  
     73?> <p class="view"><?php printf( __( 'Your account is now activate. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', 'http://' . $current_site->domain . $current_site->path ); ?></p> <?php 
    7374                } 
    7475        } 
     76} 
    7577?> 
    7678</div>