Changeset 8314 for branches/2.0/bp-core/bp-core-update.php
- Timestamp:
- 04/24/2014 12:22:06 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/bp-core/bp-core-update.php
r8312 r8314 366 366 bp_core_maybe_install_signups(); 367 367 368 $signups = get_users( array( 369 'fields' => 'all_with_meta', 370 'meta_key' => 'activation_key', 371 'meta_compare' => 'EXISTS', 372 ) ); 373 374 if ( empty( $signups ) ) { 375 return; 376 } 377 378 foreach ( $signups as $signup ) { 379 $meta = array(); 380 381 if ( bp_is_active( 'xprofile' ) ) { 382 $meta['field_1'] = $signup->display_name; 383 } 384 385 $meta['password'] = $signup->user_pass; 386 387 $user_login = preg_replace( '/\s+/', '', sanitize_user( $signup->user_login, true ) ); 388 $user_email = sanitize_email( $signup->user_email ); 389 390 BP_Signup::add( array( 391 'user_login' => $user_login, 392 'user_email' => $user_email, 393 'registered' => $signup->user_registered, 394 'activation_key' => $signup->activation_key, 395 'meta' => $meta 396 ) ); 397 398 // Deleting these options will remove signups from users count 399 delete_user_option( $signup->ID, 'capabilities' ); 400 delete_user_option( $signup->ID, 'user_level' ); 401 } 368 // Run the migration script 369 bp_members_migrate_signups(); 402 370 } 403 371
Note: See TracChangeset
for help on using the changeset viewer.