# "Change Password Script Template", Custom Database and "Requires Username"

**URL:** <https://community.auth0.com/t/change-password-script-template-custom-database-and-requires-username/97483>\
**Category:** Get Help\
**Tags:** user-password-management, user-management\
**Created:** [January 4, 2023, 8:08pm UTC](https://community.auth0.com/t/change-password-script-template-custom-database-and-requires-username/97483 "2023-01-04T20:08:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![connectionreset](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/connectionreset/32/41873_2.png) [@connectionreset](https://community.auth0.com/u/connectionreset)\
**Post date:** [January 4, 2023, 8:08pm UTC](https://community.auth0.com/t/change-password-script-template-custom-database-and-requires-username/97483/1 "2023-01-04T20:08:09Z")

</div>

Continuing the discussion from [Using username in the context of a custom database](https://community.auth0.com/t/using-username-in-the-context-of-a-custom-database/96207/3):

Hello again,

I have to come back to the problem I described in the thread above.

According to [Change Password Script Templates Documentation](https://auth0.com/docs/authenticate/database-connections/custom-db/templates/change-password) the function is always passed an email address (and never an ‘username’).

`changePassword(email, newPassword, callback): function`

How am I supposed to get the ‘username’ if it is not passed to the function?

Regards,  
Peer

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [January 28, 2023, 9:08pm UTC](https://community.auth0.com/t/change-password-script-template-custom-database-and-requires-username/97483/2 "2023-01-28T21:08:20Z")

</div>

Hi @connectionreset,

Thanks for getting in touch with us at Auth0 community.

This is a known limitation at this time in regards to using a custom database with import mode off and performing a password reset on a custom DB using a username. The change\_password script only handles an email.

We have an open feature / bug report to add the username field to the change\_password script. Unfortunately I don’t have a firm ETA yet on when this will be implemented as it is still in backlog.

I would suggest you add some feedback about this here [https://auth0.com/feedback](https://auth0.com/feedback) as this goes to our product teams and it will help gauge demand for a feature.

Warm regards.

---

<div class="post-metadata">

**Author:** ![connectionreset](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/connectionreset/32/41873_2.png) [@connectionreset](https://community.auth0.com/u/connectionreset)\
**Post date:** [January 28, 2023, 9:26pm UTC](https://community.auth0.com/t/change-password-script-template-custom-database-and-requires-username/97483/4 "2023-01-28T21:26:34Z")

</div>

Hello @SaqibHussain,

Thank you very much for this answer.

I had already thought that I had overlooked something fundamental.

I will see if I want to give further feedback on this.

Best regards

---

<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 11, 2023, 9:26pm UTC](https://community.auth0.com/t/change-password-script-template-custom-database-and-requires-username/97483/5 "2023-02-11T21:26:57Z")

</div>

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