Changeset 12349 for trunk/src/bp-core/bp-core-filters.php
- Timestamp:
- 03/01/2019 02:33:56 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-filters.php
r12284 r12349 470 470 ), 471 471 ); 472 bp_send_email( 'core-user-registration-with-blog', array( array( $user_email => $user ) ), $args ); 472 473 $signups = BP_Signup::get( 474 array( 475 'user_login' => $user, 476 ) 477 ); 478 479 $salutation = $user; 480 if ( $signups ) { 481 $signup = $signups['signups'][0]; 482 if ( isset( $signup->meta[ 'field_' . bp_xprofile_fullname_field_id() ] ) ) { 483 $salutation = $signup->meta[ 'field_' . bp_xprofile_fullname_field_id() ]; 484 } 485 } 486 487 bp_send_email( 'core-user-registration-with-blog', array( array( $user_email => $salutation ) ), $args ); 473 488 474 489 // Return false to stop the original WPMU function from continuing. … … 522 537 if ( $user_object ) { 523 538 $user_id = $user_object->ID; 539 } 540 541 $salutation = $user; 542 if ( isset( $meta[ 'field_' . bp_xprofile_fullname_field_id() ] ) ) { 543 $salutation = $meta[ 'field_' . bp_xprofile_fullname_field_id() ]; 544 } elseif ( $user_id ) { 545 $salutation = bp_core_get_user_displayname( $user_id ); 524 546 } 525 547 … … 532 554 ), 533 555 ); 534 bp_send_email( 'core-user-registration', array( array( $user_email => $ user) ), $args );556 bp_send_email( 'core-user-registration', array( array( $user_email => $salutation ) ), $args ); 535 557 536 558 // Return false to stop the original WPMU function from continuing.
Note: See TracChangeset
for help on using the changeset viewer.