wp login form – How to Disable Pre-population of Password on Password Reset
Question
because of the way my site template works, I need to stop WordPress from pre-populating a new password when a user is brought back to the site, after clicking on the password reset link in the email they get.
I just want them to be taken to the password reset page, have the password field be blank, and type in their own password.
I’ve tried putting this in functions.php, but it doesn’t work:
function disable_autofill_password_reset( $args, $user ) {
$args['autocomplete'] = 'off';
return $args;
}
add_filter( 'rp_generate_password_form_args', 'disable_autofill_password_reset', 10, 2 );
Can anyone point me in the right direction?
0
3 weeks
2023-03-08T21:18:03-05:00
2023-03-08T21:18:03-05:00 0 Answers
0 views
0
Leave an answer