diff --git bp-core/bp-core-update.php bp-core/bp-core-update.php
index 8b1f30e..79476ae 100644
|
|
function bp_update_to_2_0() { |
358 | 358 | bp_core_install_signups(); |
359 | 359 | } |
360 | 360 | |
361 | | $signups = get_users( array( |
362 | | 'fields' => 'all_with_meta', |
363 | | 'meta_key' => 'activation_key', |
364 | | 'meta_compare' => 'EXISTS', |
365 | | ) ); |
| 361 | $status_2_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->users} WHERE user_status = '2'" ); |
366 | 362 | |
367 | | if ( empty( $signups ) ) { |
| 363 | if ( ! empty( $status_2_ids ) ) { |
| 364 | $signups = get_users( array( |
| 365 | 'fields' => 'all_with_meta', |
| 366 | 'include' => $status_2_ids, |
| 367 | ) ); |
| 368 | } else { |
368 | 369 | return; |
369 | 370 | } |
370 | 371 | |
371 | 372 | foreach ( $signups as $signup ) { |
372 | 373 | $meta = array(); |
373 | 374 | |
| 375 | if ( empty( $signup->activation_key ) ) |
| 376 | $signup->activation_key = wp_hash( $signup->ID ); |
| 377 | |
374 | 378 | if ( bp_is_active( 'xprofile' ) ) { |
375 | 379 | $meta['field_1'] = $signup->display_name; |
376 | 380 | } |