BP_Settings_Export::process_erase( $user,  $page, bool $email_address )

Delete user profile settings.

Description

Parameters

$user

(Required)

$page

(Required)

$email_address

(Required)

Return

(array)

Source

File: bp-core/gdpr/class-bp-settings-export.php

	function process_erase( $user, $page, $email_address ) {

		if ( ! $user || is_wp_error( $user ) ) {
			return $this->response_erase( array(), true );
		}

		$items_removed  = true;
		$items_retained = false;

		$notification_settings = $this->get_notification_settings();

		foreach ( $notification_settings as $noti_key => $notification_label ) {
			bp_delete_user_meta( $user->ID, $noti_key );
		}

		/**
		 * @todo add title/description
		 *
		 * @since BuddyBoss 1.0.0
		 */
		do_action( 'buddyboss_bp_gdpr_delete_additional_settings', $user );

		$done = true;

		return $this->response_erase( $items_removed, $done, array(), $items_retained );
	}

Changelog

Changelog
Version Description
BuddyBoss 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.