How do you rate password recovery

How to remove password on wordpress recovery

Divi: the easiest WordPress theme to use

Divi: the best WordPress theme ever!

More 901,000 downloads, Divi is the world's most popular WordPress theme. It's complete, easy to use, and comes with 62+ free templates. [Recommended]

Do you want to remove the password recovery option in WordPress? By default, WordPress allows users to reset / change their passwords by specifying their email address. Sometimes you want to turn this option off in WordPress.

In this tutorial I am going to show you how to disable password recovery on Wordpress.

Why remove the password reset option in WordPress?

If you allow registrations on your WordPress site, the reset option is useful for users who have lost their password. Actually, you don't need to remove this option.

However, in some cases you may want to remove this option for some users or roles in WordPress.

For example, if you've created a temporary account for someone, or if you've created a demo account that users can use (with basic identifiers that should not be changed).

The simplest solution would be to just delete the reset link. Some users may already know the URL to restore an account to.

That being said, let's see how easy it is to turn off the password reset option in WordPress.

Easily build your website with Elementor

Elementor makes it easy to create any website design with a professional look. Stop paying dearly for what you can do yourself. [Free]

Method XNUMX: Disable Password Recovery Using a WordPress Plugin

This method is better and easier. You can turn off password resetting in WordPress for certain user roles or even for some users.

This allows you to control access to this feature, which you can reserve only for trusted users.

First you have to install and activate the plugin. "Plainview Protect Passwords ". You can discover more details how to install a wordpress plugin.

After you have activated the plugin, you only have to open the page "Settings> Protect Passwords How to configure the plugin

From there, all you have to do is select the role of the individual user whose password recovery feature you want to disable.

There is also an option to exclude certain users. This option is especially useful if you want to keep the password recovery option yourself (for your account).

Do not forget to "save Changes How to change the settings of your shop.

You can see the plugin in action by clicking "Mot de passe perdu ? This will take you to the reset page where you can provide the email address or username you want to change the password for.

You will notice an error telling you that this option has been disabled for that particular user.

Method XNUMX: Manually Disabling the Password Reset Option

This method involves adding code to your WordPress site. It is not recommended to anyone who has no web development experience. Remember, we showed you How do I create a WordPress plugin?

All you have to do is add the following code to your plugin:

Class Password_Reset_Removed {function __construct () {add_filter ('show_password_fields', array ($ this, 'disable')); add_filter ('allow_password_reset', Array ($ this, 'disable')); add_filter ('gettext', array ($ this, 'remove')); } function disable () {if (is_admin ()) {$ userdata = wp_get_current_user (); $ user = new WP_User ($ userdata-> ID); if (! empty ($ user-> roles) && is_array ($ user-> roles) && $ user-> roles [0] == 'Administrator') return true; } return incorrectly; } function remove ($ text) {return str_replace (Array ('Lost Password?', 'Lost Password'), '', trim ($ text, '?')); }} $ pass_reset_removed = new Password_Reset_Removed ();

After you've finished editing, all that's left to do is install your plugin on your WordPress blog. The procedure is the same as for all other plugins.

You can also use an FTP client to send your website online. Once you're done, you'll need to activate your plugin. That's all. The default with this method is that the password reset option is turned off for everyone.

That's it for this tutorial. I hope it will be of great use to you. Do not hesitate to contact us for further clarification.

This article has 0 comments

This website uses Akismet to reduce unwanted content. Learn more about how your comment data is used.