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
This commit is contained in:
Andrew Nacin 2010-12-15 17:09:26 +00:00
parent 598bb9952a
commit 2a44684f3e
1 changed files with 8 additions and 4 deletions

View File

@ -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);