From 2a44684f3e3c713a766647145b174df620fe1a7a Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@16954 602fd350-edb4-49c9-b593-d223f7449a82 --- 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);