From 3a11a6842e91ba65e15116bd5aeb964b4b227f64 Mon Sep 17 00:00:00 2001 From: donncha Date: Wed, 28 Mar 2007 13:22:00 +0000 Subject: Better handling of already activated accounts git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@941 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-activate.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'wp-activate.php') diff --git a/wp-activate.php b/wp-activate.php index fbb99f9..93671ff 100644 --- a/wp-activate.php +++ b/wp-activate.php @@ -25,7 +25,7 @@ form { margin-top: 2em; } if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>

-
+ @@ -46,16 +46,23 @@ if ( empty($_GET['key']) && empty($_POST['key']) ) { $result = wpmu_activate_signup($key); if ( is_wp_error($result) ) { - if ( 'already_active' == $result->get_error_code() ) - echo __('You have already activated your account. Please check your email inbox for your username, password, and login instructions.'); - else + if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) { + $signup = $result->get_error_data(); + _e( '

Your account is now active!

' ); + if( $signup->domain . $signup->path == '' ) { + printf(__('

Your account has been activaed. You may now login 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 reset your password.

'), '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'); + } else { + printf(__('

Your blog at %2$s 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 reset your password.

'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); + } + } else { echo $result->get_error_message(); + } } else { extract($result); $url = get_blogaddress_by_id($blog_id); $user = new WP_User($user_id); ?> -

+

-- cgit