wpseek.com
A WordPress-centric search engine for devs and theme authors



get_profile › WordPress Function

Since1.5.0
Deprecated3.0.0
get_profile ( $field, $user = false )
Parameters: (2)
  • (string) $field User meta field.
    Required: Yes
  • (false|int) $user Optional. User ID to retrieve the field for. Default false (current user).
    Required: No
    Default: false
See:
Returns:
  • (string) The author's field from the current author's DB object.
Defined at:
Codex:

Retrieve user data based on field.



Source

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 );
}