Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get profile

This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php. Use get_the_author_meta instead.


Retrieve user data based on field.

Use get_profile() will make a database query to get the value of the table column. The value might be cached using the query cache, but care should be taken when using the function to not make a lot of queries for retrieving user profile information.

If the $user parameter is not used, then the user will be retrieved from a cookie of the user. Therefore, if the cookie does not exist, then no value might be returned. Sanity checking must be done to ensure that when using get_profile() that (empty|null|false) values are handled and that something is at least displayed.


<?php get_profile$field$user ); ?>


(string) (required) User field to retrieve. See users table for possible $field values.
Default: None
(string) (optional) User username. Uses user cookie to determine user if this is false or omitted.
Default: false

Return Values

The value in the field.



Change Log

  • Deprecated: 3.0
  • Since: 1.5.0

Source File

get_profile() is located in wp-includes/user.php - (2.9.2)
get_profile() is located in wp-includes/deprecated.php - (Deprecated, 3.0)


See also index of Function Reference and index of Template Tags.