If your WordPress website has registration enabled, but you don't want users to reset their passwords via the password recovery feature, you can use the following code to disable the password reset function.
Add the following code to your theme's functions file. If you don't know how to add it, see:Safe Method to Add Code to the functions.php File: Code Snippets
function disable_password_reset() {
return false;
}
add_filter ( 'allow_password_reset', 'disable_password_reset' );After disabling, when users click 'Forgot Password,' they will be prompted that password setting is unavailable.