# 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:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![francis](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/francis/32/78428_2.png) [@francis](https://community.auth0.com/u/francis)\
**Post date:** [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/1 "2026-02-13T14:54:42Z")

</div>

Hi,

I’m newbie with auth0.  
Is there a way to get the user profile from auth0 when login to select the good profile in wordpress for the user creation.  
Standard users which logged will have the subscriber profile in wp and journalists users will have a specific profile in WP : Journalist 🙂  
TIA for help  
Francis

---

<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

---

<div class="post-metadata">

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

</div>

Thanks to you and the resources you have pointed me to, I have a better idea of where I need to go.

Thank you very much.

---

<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, 6:48pm UTC](https://community.auth0.com/t/get-user-profile-from-auth0-to-create-wordpress-user-with-the-good-profile/197272/5 "2026-02-13T18:48:29Z")

</div>

Hi @francis,

You are more than welcome anytime!

Make sure you have a great one!  
Remus

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 27, 2026, 6:49pm UTC](https://community.auth0.com/t/get-user-profile-from-auth0-to-create-wordpress-user-with-the-good-profile/197272/6 "2026-02-27T18:49:00Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
