From 1b18b8e5f06da5712912f6f4bc0db9b11116ecce Mon Sep 17 00:00:00 2001 From: nacin Date: Wed, 15 Dec 2010 17:09:26 +0000 Subject: [PATCH] s/site/user/ if signup doesn't have a domain attached. props wpmuguru, fixes #15780. git-svn-id: http://svn.automattic.com/wordpress/trunk@16954 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-functions.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 19c24ef1e6..976fcbc22a 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -770,11 +770,15 @@ function wpmu_activate_signup($key) { $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE activation_key = %s", $key) ); - if ( empty($signup) ) - return new WP_Error('invalid_key', __('Invalid activation key.')); + if ( empty( $signup ) ) + return new WP_Error( 'invalid_key', __( 'Invalid activation key.' ) ); - if ( $signup->active ) - return new WP_Error('already_active', __('The site is already active.'), $signup); + if ( $signup->active ) { + if ( empty( $signup->domain ) ) + return new WP_Error( 'already_active', __( 'The user is already active.' ), $signup ); + else + return new WP_Error( 'already_active', __( 'The site is already active.' ), $signup ); + } $meta = unserialize($signup->meta); $user_login = $wpdb->escape($signup->user_login);