Description
Returns an array keyed by meta keys of the user’s registration data for all fields in the WP-Members Fields. Returns the current user unless a user ID is specified.
Parameters
$user_id
(int) (optional) The user ID. If not ID is passed, the current user ID will be used.
$all
(boolean) (optional) If true, all meta fields for the user will be returned in the array, otherwise limited to WP-Members fields only (default: false).
Return Value
(array) Returns an array of the user’s data for fields in the WP-Members fields array keyed by field meta keys.
Examples
$user_data_array = wpmem_user_data( $user_id );
Changelog
Introduced in version 3.2.0
$all argument added in version 3.2.6
Source
wpmem_user_data() is located in /includes/api-users.php.