Changeset 35575
- Timestamp:
- 11/08/2015 03:15:07 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/schema.php
r35507 r35575 898 898 $errors->add( 'siteid_exists', __( 'The network already exists.' ) ); 899 899 900 $site_user = get_user_by( 'email', $email );901 900 if ( ! is_email( $email ) ) 902 901 $errors->add( 'invalid_email', __( 'You must provide a valid email address.' ) ); … … 904 903 if ( $errors->get_error_code() ) 905 904 return $errors; 905 906 // If a user with the provided email does not exist, default to the current user as the new network admin. 907 $site_user = get_user_by( 'email', $email ); 908 if ( false === $site_user ) { 909 $site_user = wp_get_current_user(); 910 } 906 911 907 912 // Set up site tables. … … 968 973 $sitemeta = array( 969 974 'site_name' => $site_name, 970 'admin_email' => $ site_user->user_email,975 'admin_email' => $email, 971 976 'admin_user_id' => $site_user->ID, 972 977 'registration' => 'none',
Note: See TracChangeset
for help on using the changeset viewer.