# Get user profile from auth0 to create wordpress user with the good profile

**URL:** <https://community.auth0.com/t/get-user-profile-from-auth0-to-create-wordpress-user-with-the-good-profile/197272>\
**Category:** Get Help\
**Tags:** connection-provisioning-flows, connections\
**Created:** [February 13, 2026, 2:54pm UTC](https://community.auth0.com/t/get-user-profile-from-auth0-to-create-wordpress-user-with-the-good-profile/197272 "2026-02-13T14:54:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [February 13, 2026, 4:48pm UTC](https://community.auth0.com/t/get-user-profile-from-auth0-to-create-wordpress-user-with-the-good-profile/197272/3 "2026-02-13T16:48:48Z")

</div>

Hi @francis,

Welcome to the Auth0 Community!

The recommended way of retrieving the Auth0 user profile on user creation in Wordpress is using actions and filters to run custom code at specific points during runtime, more specifically the` auth0_create_user_data` filter. It allows you to intercept the data packet right before it hits the WordPress database to create the account. You can check out our documentation on how to [Extend Login by Auth0 WordPress Plugin](https://auth0.com/docs/customize/integrations/cms/wordpress-plugin/extend-login-by-auth0), which provides more details, potentially other options of achieving this as well.

When you use this filter, the `$userinfo` object contains either the Custom Claim or the metadata that you will have to inject via an Auth0 Action. You can check out this articles - [Add Roles and Permissions to the ID Token Using Actions](https://support.auth0.com/center/s/article/add-roles-and-permissions-to-the-id-token-using-actions) or [Adding Custom Claims to Tokens](https://support.auth0.com/center/s/article/add-roles-and-permissions-to-the-id-token-using-actions). You then inject the corresponding WordPress role into the `$user_data` array.

An important distinction here would be that **`auth0_create_user_data`** only runs when the user **doesn’t exist** in WP yet, when **`auth0_user_login`** runs every time. If you want roles to stay synchronized (e.g., if a journalist’s contract ends and you demote them in Auth0), you should use the login hook instead.

I will also recommend checking out this community post, since it pinpoints to the same subject - [Set a users WordPress role](https://community.auth0.com/t/set-a-users-wordpress-role/21391) and provides useful Wordpress documentation as well - [How to change a user’s role?](https://wordpress.stackexchange.com/questions/4725/how-to-change-a-users-role/4727#4727)

Thank you for posting your questions and if you have further inquiries on the matter please reach out to us, as we are more than glad to assist!  
Kind regards,  
Remus

---

_[View the full topic](https://community.auth0.com/t/get-user-profile-from-auth0-to-create-wordpress-user-with-the-good-profile/197272)._
