BP_XProfile_ProfileData::delete_data_for_user( int $user_id )

Delete all data for provided user ID.

Description

Parameters

$user_id

(Required) User ID to remove data for.

Return

(false|int)

Source

File: bp-xprofile/classes/class-bp-xprofile-profiledata.php

	public static function delete_data_for_user( $user_id ) {
		global $wpdb;

		$bp = buddypress();

		return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_data} WHERE user_id = %d", $user_id ) );
	}

Changelog

Changelog
Version Description
BuddyPress 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.