WordPress的通用密码并重置为默认密码

I am trying to create a functionality of adding a master password in my WordPress site (4.4.8) also if anyone uses that on a particular user the user's password will get reset to a default password.

Any inputs to progress so that I can implement this quickly.

There are plugins that will provide me the ability to use master password but not reset password to default.

Any help is appreciated thanks.

What you are trying to do sounds vulnerable. The most convinient solution that I've found is wp_set_password().

If you wish to do it with mySQL query then this might help-

SELECT ID, user_login, user_pass FROM wp_users;
UPDATE wp_users SET user_pass = MD5(‘WPEXPLORER’) WHERE ID=1 LIMIT 1;