Title: Error while password reset
Last modified: February 5, 2025

---

# Error while password reset

 *  [hasintha86](https://wordpress.org/support/users/hasintha86/)
 * (@hasintha86)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/error-while-password-reset/)
 * Hi team, recently installed wp 2fa on our production site and when we try to 
   reset password of a subscriber user , receive the below error message on the 
   debug.log.
 * We’ve configured only Administrators and Editors to use 2FA. How come are we 
   getting this error for reset password. ? Please help us to debug this issue
 *     ```wp-block-code
       AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WP2FA\\Authenticator\\Reset_Password::lostpassword_post(), 1 passed in /opt/bitnami/wordpress/wp-includes/class-wp-hook.php on line 308 and exactly 2 expected in /opt/bitnami/wordpress/wp-content/plugins/wp-2fa/includes/classes/Authenticator/class-reset-passord.php:47\nStack trace:\n#0 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(308): WP2FA\\Authenticator\\Reset_Password::lostpassword_post()\n#1 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#2 /opt/bitnami/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()\n#3 /opt/bitnami/wordpress/wp-content/plugins/frontend-reset-password/includes/somfrp-functions.php(343): do_action()\n#4 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(308): somfrp_lost_pass_callback()\n#5 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#6 /opt/bitnami/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()...', referer: https://www.nextlabs.com/reset-password/
       ```
   
 * PS: we use Frontend Reset Password plugin for password reset process.
    -  This topic was modified 1 year, 4 months ago by [hasintha86](https://wordpress.org/support/users/hasintha86/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-while-password-reset%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/error-while-password-reset/#post-18234501)
 * Thank you for using our plugin. We’d like to learn more about your setup to better
   understand the issue.
 * You have 2FA configured only for administrators and editors, however, is the 
   error reported only when you reset the password of a user with one of these roles,
   or any roles?
 * Also, does this happen when the user resets their own password, or when you as
   admin reset their password?
 * Also, have you tried resetting the user password via the standard WordPress dashboard?
   If not, can you try and advise if you get the error as well?
 * Looking forward to hearing from you.
 *  Thread Starter [hasintha86](https://wordpress.org/support/users/hasintha86/)
 * (@hasintha86)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/error-while-password-reset/#post-18235525)
 * hi Robert
 * G’Day to you!
 * Thank you for the response. This happens for any user (with any role) tries to
   reset their password in the frontend.
 * This happens when user tries to reset his own password.
 * This doesn’t happen if we try to reset the user’s password using the backend .
   i.e user profile
 * Best Regards
 *  Plugin Support [Lucian Padureanu](https://wordpress.org/support/users/lucianwpwhite/)
 * (@lucianwpwhite)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/error-while-password-reset/#post-18242607)
 * Hello again [@hasintha86](https://wordpress.org/support/users/hasintha86/)! 
   
   My name is Lucian, part of the Melapress Support Team.Thank you for reaching 
   out with all the details and for bringing this to our attention!
 * After thoroughly reviewing the reported error and consulting with our developers,
   I can confirm that this issue** is not caused directly by our plugin**. The error
   stems from the “My Frontend Reset Password” plugin, which appears not to be following
   the most recent WordPress coding standards for the `lostpassword_post` hook.
 * As outlined in the WordPress documentation for this hook ([lostpassword_post](https://developer.wordpress.org/reference/hooks/lostpassword_post/)),
   since **WordPress 5.4.0**, the `lostpassword_post` action has required **two 
   parameters**:
    1. `$errors` – A `WP_Error` object containing any validation or error messages.
    2. `$user_data` – Information about the user submitting the request.
 * The issue here is that the “My Frontend Reset Password” plugin has likely hooked
   into `lostpassword_post` without updating their implementation to support this
   new parameter structure. 
   This is clearly documented in the official WordPress
   codebase as shown [here](https://github.com/WordPress/wordpress-develop/blob/d2a7bee9a6201f0276492ff29afd8c509480d266/src/wp-includes/user.php#L3149),
   which reflects changes made in version 5.4.0 (a version released years ago).
 * Our plugin adheres to WordPress coding standards, and we have verified that it
   does not interfere with this hook. Unfortunately, it clearly looks like the issue
   lies with the other plugin’s outdated implementation, and there’s nothing we 
   can do in our plugin’s code to cater for this.
 * I recommend reaching out to the developers of the “My Frontend Reset” plugin 
   and sharing the references above, in regards to proper handling the `lostpassword_post`
   action with the correct parameters. They will surely be able to properly assist
   you with this.
 * Thank you for your understanding. If there’s anything else we can assist with,
   please don’t hesitate to let us know!
 * Best regards,

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

The topic ‘Error while password reset’ is closed to new replies.

 * ![](https://ps.w.org/wp-2fa/assets/icon-256x256.png?rev=2961533)
 * [WP 2FA - Two-factor authentication for WordPress](https://wordpress.org/plugins/wp-2fa/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-2fa/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-2fa/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-2fa/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-2fa/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-2fa/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [Lucian Padureanu](https://wordpress.org/support/users/lucianwpwhite/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/error-while-password-reset/#post-18242607)
 * Status: not resolved