Changeset 6659 for trunk/bp-xprofile/bp-xprofile-functions.php
- Timestamp:
- 12/25/2012 09:10:54 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-functions.php
r6574 r6659 426 426 */ 427 427 function xprofile_sync_wp_profile( $user_id = 0 ) { 428 global $bp, $wpdb; 428 429 $bp = buddypress(); 429 430 430 431 if ( !empty( $bp->site_options['bp-disable-profile-sync'] ) && (int) $bp->site_options['bp-disable-profile-sync'] ) … … 452 453 bp_update_user_meta( $user_id, 'last_name', $lastname ); 453 454 455 global $wpdb; 456 454 457 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $user_id ) ); 455 458 } 456 459 add_action( 'xprofile_updated_profile', 'xprofile_sync_wp_profile' ); 457 add_action( 'bp_core_signup_user', 'xprofile_sync_wp_profile' ); 460 add_action( 'bp_core_signup_user', 'xprofile_sync_wp_profile' ); 461 add_action( 'bp_core_activated_user', 'xprofile_sync_wp_profile' ); 458 462 459 463
Note: See TracChangeset
for help on using the changeset viewer.