• Resolved samjansen97

    (@samjansen97)


    I have a form that creates a user and sets a password automatically. The user receives an automatic email from WordPress to reset there password. When you click on the email it redirects you to a wordpress page where you can set an password. After saving your password you get logged in automatically. This all works fine. The only problem is that when the user tries to login again with the password he set. It does not work. It says password incorrect. What could be the issue?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator James Huff

    (@macmanx)

    Do all users have this problem?

    If it’s just one user reporting it, most of the time it’s just because they’re failing to save the new password in their password manager.

    Thread Starter samjansen97

    (@samjansen97)

    I found it our myself. It happens when the password is through the automatic password reset link. For example if I choose 1234 as password and save the password. I am logged in automatically. But when I try to loggin again it with that same password it says pasword incorrect

    You can try it yourselve through this page:

    https://bevrijdingsbediening.nl/plan-je-gesprek/

    after you filled in the form you will receive a link to set your password from wordpress

    Moderator James Huff

    (@macmanx)

    Hm, that’s quite custom beyond WordPress’s built-in account system.

    This problem may be a plugin or theme conflict. Please attempt to deactivate all plugins and switch to the default Twenty Twenty-Four theme. If the problem goes away, re-activate them one by one to identify the source of the problem.

    If you can install plugins, install Health Check. On the troubleshooting tab, you can click the button to deactivate all plugins and change the theme for you while you’re still logged in without affecting normal visitors to your site.

    Thread Starter samjansen97

    (@samjansen97)

    It is not really custom I believe. I just customized the password reset page with some css. But it is WordPress that sents the email to reset the password. Can you try the link to fill in the form?

    Moderator James Huff

    (@macmanx)

    It is quite custom. Your site’s normal password reset page would be https://bevrijdingsbediening.nl/wp-login.php?action=lostpassword would have WordPress’s default styling and would not be redirected.

    I also don’t intend to register for your site, as I don’t agree with your privacy policy. Instead, I tested on my own sites running WordPress 6.7.1 and cannot reproduce the issue there.

    So, please attempt to deactivate all plugins and switch to the default Twenty Twenty-Four theme, then try resetting a password.

    If the problem goes away, re-activate them one by one to identify the source of the problem.

    Thread Starter samjansen97

    (@samjansen97)

    That password reset page is not what I am talking about. I am talking about the WordPress page where you can generate a password. I tried with disabling all plugins/themes except for the form plugin that creates the user and let WordPress sent the password reset link. It worked indeed but there was no auto login after setting the password. So maybe because of the auto login the password is not set?

    See here screencast with the problem:
    https://somup.com/cZleYwJLFQ

    Moderator James Huff

    (@macmanx)

    That could be, yeah.

    If it works with all of your plugins deactivated and the Twenty Twenty-Four theme in use, re-activate them one by one to identify the source of the problem.

    Thread Starter samjansen97

    (@samjansen97)

    The redirect hook fired to early that after password reset that was the problem.

    No it is fixed with this code:

    function auto_login_after_password_reset($user, $new_pass) {
    wp_set_current_user($user->ID);
    wp_set_auth_cookie($user->ID, true);


    wp_safe_redirect('websuteurl/');
    exit;

    }
    add_action(‘after_password_reset’, ‘auto_login_after_password_reset’, 10, 2);

    I got this issue as well.
    Users can’t reset the password. Also when I send them the email to help them.
    It’s urgent to solve it

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.