bp_get_user_meta( int $user_id, string $key, bool $single = false )
Get a piece of usermeta.
Description Description
This is a wrapper for get_user_meta() that allows for easy use of bp_get_user_meta_key(), thereby increasing compatibility with non-standard BP setups.
See also See also
- get_user_meta(): For complete details about parameters and return values.
Parameters Parameters
- $user_id
-
(Required) The ID of the user whose meta you're fetching.
- $key
-
(Required) The meta key to retrieve.
- $single
-
(Optional) Whether to return a single value.
Default value: false
Return Return
(mixed) Will be an array if $single is false. Will be value of meta data field if $single is true.
Source Source
File: bp-core/bp-core-functions.php
function bp_get_user_meta( $user_id, $key, $single = false ) { return get_user_meta( $user_id, bp_get_user_meta_key( $key ), $single ); }
Changelog Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |