Changeset 21413 for trunk/wp-includes/ms-functions.php
- Timestamp:
- 08/03/2012 01:06:05 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-functions.php
r21387 r21413 184 184 switch_to_blog($blog_id); 185 185 186 $user = new WP_User($user_id);187 188 if ( ! $user ->exists()) {186 $user = get_userdata( $user_id ); 187 188 if ( ! $user ) { 189 189 restore_current_blog(); 190 190 return new WP_Error('user_does_not_exist', __('That user does not exist.')); … … 247 247 248 248 // wp_revoke_user($user_id); 249 $user = new WP_User($user_id);250 if ( ! $user ->exists()) {249 $user = get_userdata( $user_id ); 250 if ( ! $user ) { 251 251 restore_current_blog(); 252 252 return new WP_Error('user_does_not_exist', __('That user does not exist.')); … … 1057 1057 return false; 1058 1058 1059 $user = new WP_User($user_id);1059 $user = get_userdata( $user_id ); 1060 1060 1061 1061 $options_site_url = esc_url(network_admin_url('settings.php')); … … 1234 1234 1235 1235 $url = get_blogaddress_by_id($blog_id); 1236 $user = new WP_User($user_id);1236 $user = get_userdata( $user_id ); 1237 1237 1238 1238 $welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email ); … … 1283 1283 $welcome_email = get_site_option( 'welcome_user_email' ); 1284 1284 1285 $user = new WP_User($user_id);1285 $user = get_userdata( $user_id ); 1286 1286 1287 1287 $welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta); … … 1509 1509 function wpmu_log_new_registrations( $blog_id, $user_id ) { 1510 1510 global $wpdb; 1511 $user = new WP_User( (int) $user_id );1511 $user = get_userdata( (int) $user_id ); 1512 1512 $wpdb->insert( $wpdb->registration_log, array('email' => $user->user_email, 'IP' => preg_replace( '/[^0-9., ]/', '',$_SERVER['REMOTE_ADDR'] ), 'blog_id' => $blog_id, 'date_registered' => current_time('mysql')) ); 1513 1513 } … … 1752 1752 $user_id = get_user_id_from_string( $username ); 1753 1753 } 1754 $u = new WP_User( $user_id );1754 $u = get_userdata( $user_id ); 1755 1755 1756 1756 return ( isset( $u->spam ) && $u->spam == 1 );
Note: See TracChangeset
for help on using the changeset viewer.