# Unable to login with existing credentials

**URL:** <https://community.auth0.com/t/unable-to-login-with-existing-credentials/106876>\
**Category:** Integration Help\
**Tags:** wordpress, support\
**Created:** [May 14, 2023, 2:04pm UTC](https://community.auth0.com/t/unable-to-login-with-existing-credentials/106876 "2023-05-14T14:04:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lynnchin](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@lynnchin](https://community.auth0.com/u/lynnchin)\
**Post date:** [May 14, 2023, 2:04pm UTC](https://community.auth0.com/t/unable-to-login-with-existing-credentials/106876/1 "2023-05-14T14:04:22Z")

</div>

Hello,

I am having issue with login with existing user in wordpress while enable User Migration in Login by Auth0 Wordpress Plugin.

Every time I login, I am getting the following error messages:

`Returned user contains an invalid user_id value. If your Database Connection has enabled the "Use my own database" option, please make sure to return this attribute as string without spaces.`

Can someone advise what is going on?

Thanks.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [May 15, 2023, 10:42pm UTC](https://community.auth0.com/t/unable-to-login-with-existing-credentials/106876/3 "2023-05-15T22:42:23Z")

</div>

Hi @lynnchin,

Thanks for reaching out to the Auth0 Community!

The error you shared is stating that the `user_id` being returned is an invalid value.

When checking your WordPress custom database, I suspect the issue coming from the `user_id` in your Get User script.

In this case, could you please make sure the value returned is a string? You could use the `toString()` method to accomplish this.  
For example:

```auto
user_id: user._id.toString(),

```

Please let me know how this goes.

Thanks,  
Rueben

---

<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:** [May 29, 2023, 10:42pm UTC](https://community.auth0.com/t/unable-to-login-with-existing-credentials/106876/4 "2023-05-29T22:42:24Z")

</div>

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