Warning: This function has been deprecated. Use get_the_author_meta() instead.

get_profile( string $field, false|int $user = false )

Retrieve user data based on field.


Description Description

See also See also


Top ↑

Parameters Parameters

$field

(string) (Required) User meta field.

$user

(false|int) (Optional) User ID to retrieve the field for. Default false (current user).

Default value: false


Top ↑

Return Return

(string) The author's field from the current author's DB object.


Top ↑

Source Source

File: wp-includes/deprecated.php

2413
2414
2415
2416
2417
2418
2419
2420
function get_profile( $field, $user = false ) {
    _deprecated_function( __FUNCTION__, '3.0.0', 'get_the_author_meta()' );
    if ( $user ) {
        $user = get_user_by( 'login', $user );
        $user = $user->ID;
    }
    return get_the_author_meta( $field, $user );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Use get_the_author_meta()
1.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.