bp_delete_user_meta( int $user_id, string $key, mixed $value = '' )

Delete a piece of usermeta.

Description

This is a wrapper for delete_user_meta() that allows for easy use of bp_get_user_meta_key(), thereby increasing compatibility with non-standard BP setups.

See also

Parameters

$user_id

(int) (Required) The ID of the user whose meta you're deleting.

$key

(string) (Required) The meta key to delete.

$value

(mixed) (Optional) Metadata value.

Default value: ''

Return

(bool) False for failure. True for success.

Source

File: bp-core/bp-core-functions.php

function bp_delete_user_meta( $user_id, $key, $value = '' ) {
	return delete_user_meta( $user_id, bp_get_user_meta_key( $key ), $value );
}

Changelog

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