xprofile_updated_profile

  • do_action( 'xprofile_updated_profile', $bp->displayed_user->id, $posted_field_ids, $errors )

    Source Reference:

    • Component: BuddyPress:: bp-xprofile
      File: /bp-xprofile/bp-xprofile-screens.php :: Trac Source Line: 107
      				else
      					$value = $_POST['field_' . $field_id];
      
      				if ( !xprofile_set_field_data( $field_id, $bp->displayed_user->id, $value, $is_required[$field_id] ) )
      					$errors = true;
      				else
      					do_action( 'xprofile_profile_field_data_updated', $field_id, $value );
      			}
      
      			do_action( 'xprofile_updated_profile', $bp->displayed_user->id, $posted_field_ids, $errors );
      
      			// Set the feedback messages
      			if ( $errors )
      				bp_core_add_message( __( 'There was a problem updating some of your profile information, please try again.', 'buddypress' ), 'error' );
      			else
      				bp_core_add_message( __( 'Changes saved.', 'buddypress' ) );
      
      			// Redirect back to the edit screen to display the updates and message
      			bp_core_redirect( trailingslashit( bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/' . bp_action_variable( 1 ) ) );
      		}
      

Hook: add_action: xprofile_updated_profile instances (3)

  • add_action( 'xprofile_updated_profile',      'xprofile_clear_profile_data_object_cache'   )
    $function_to_add: xprofile_clear_profile_data_object_cache
    $priority: 0
    $accepted_args: 0

    Source Reference:

Hook: add_action: xprofile_updated_profile instances (3)

  • add_action( 'xprofile_updated_profile', 'bp_core_clear_cache' )
    $function_to_add: bp_core_clear_cache
    $priority: 0
    $accepted_args: 0

    Source Reference:

Hook: add_action: xprofile_updated_profile instances (3)

  • add_action( 'xprofile_updated_profile', 'xprofile_sync_wp_profile' )
    $function_to_add: xprofile_sync_wp_profile
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: BuddyPress :: bp-xprofile
      File: /bp-xprofile/bp-xprofile-functions.php :: Trac Source Line: 416
      		$lastname = trim( substr( $fullname, $space, strlen( $fullname ) ) );
      	}
      
      	update_user_meta( $user_id, 'nickname',   $fullname  );
      	update_user_meta( $user_id, 'first_name', $firstname );
      	update_user_meta( $user_id, 'last_name',  $lastname  );
      
      	$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $user_id ) );
      }
      add_action( 'xprofile_updated_profile', 'xprofile_sync_wp_profile' );
      add_action( 'bp_core_signup_user', 'xprofile_sync_wp_profile' );
      
      /**
       * Syncs the standard built in WordPress profile data to XProfile.
       *
       * @since 1.2.4
       * @package BuddyPress Core
       */
      function xprofile_sync_bp_profile( &$errors, $update, &$user ) {
      

Comments are closed.