Title: Php function to get account custom fields
Last modified: September 18, 2024

---

# Php function to get account custom fields

 *  Resolved [lucavanon](https://wordpress.org/support/users/lucavanon/)
 * (@lucavanon)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/php-function-to-get-account-custom-fields/)
 * Hello,
   is there a PHP function/hook like “get_user_meta” to get the values stored
   in a UsersWP account custom field given the used ID and the field name?Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Paolo](https://wordpress.org/support/users/paoltaia/)
 * (@paoltaia)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/php-function-to-get-account-custom-fields/#post-18023256)
 * Hi,
 * UsersWP has its own function that is identical to the default WP [get_usermeta()](https://developer.wordpress.org/reference/functions/get_usermeta/).
 * Just prefix it with uwp_
 * Eg:
 *     ```wp-block-code
       uwp_get_usermeta($user_id, 'field_key');
       ```
   
 * I hope this helps, let me know how it goes.
 * Thanks,
 * Paolo
 *  Thread Starter [lucavanon](https://wordpress.org/support/users/lucavanon/)
 * (@lucavanon)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/php-function-to-get-account-custom-fields/#post-18024739)
 * Hi Paolo,
   it works as expected.Thanks a lot for your help!Luca
 *  Plugin Contributor [Paolo](https://wordpress.org/support/users/paoltaia/)
 * (@paoltaia)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/php-function-to-get-account-custom-fields/#post-18027296)
 * Glad it worked, we created a docs page for this with a few examples: [https://docs.userswp.io/article/771-userswp-function-uwpgetusermeta](https://docs.userswp.io/article/771-userswp-function-uwpgetusermeta)
   
   Hopefully, it will be useful for others, too.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Php function to get account custom fields’ is closed to new replies.

 * ![](https://ps.w.org/userswp/assets/icon-256x256.png?rev=2784318)
 * [UsersWP - Front-end login form, User Registration, User Profile & Members Directory plugin for WP](https://wordpress.org/plugins/userswp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/userswp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/userswp/)
 * [Active Topics](https://wordpress.org/support/plugin/userswp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/userswp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/userswp/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [field](https://wordpress.org/support/topic-tag/field/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 3 replies
 * 2 participants
 * Last reply from: [Paolo](https://wordpress.org/support/users/paoltaia/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/php-function-to-get-account-custom-fields/#post-18027296)
 * Status: resolved