• 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

    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.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor robertabela

    (@robert681)

    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

    (@hasintha86)

    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

    (@lucianwpwhite)

    Hello again @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), 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, 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.