Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/13/2010 07:29:13 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2315 props paulgibbs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-xprofile.php

    r2984 r2996  
    923923add_action( 'bp_core_signup_user', 'xprofile_sync_wp_profile' );
    924924
     925
     926/* xprofile_sync_bp_profile()
     927 *
     928 * Syncs the standard built in WordPress profile data to XProfile.
     929 *
     930 * @since 1.2.4
     931 * @package BuddyPress Core
     932 */
     933function xprofile_sync_bp_profile( &$errors, $update, &$user ) {
     934    global $bp;
     935
     936    if ( (int)$bp->site_options['bp-disable-profile-sync'] || !$update || $errors->get_error_codes() )
     937        return;
     938
     939    xprofile_set_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user->ID, $user->display_name );
     940}
     941add_action( 'user_profile_update_errors', 'xprofile_sync_bp_profile', 10, 3 );
     942
    925943/**
    926944 * xprofile_remove_screen_notifications()
Note: See TracChangeset for help on using the changeset viewer.