Php 如何使用add_filter()检查强密码?
我正在使用导师LMS,但注册页面不支持强密码验证。。注册者可以使用非常弱的密码进行注册,如:1或1234 所以我想编辑这个插件的register.php文件。。 我使用了以下代码,但它没有检查密码的强度。。有没有其他方法我可以用?通过使用add_filter()Php 如何使用add_filter()检查强密码?,php,wordpress,passwords,verification,add-filter,Php,Wordpress,Passwords,Verification,Add Filter,我正在使用导师LMS,但注册页面不支持强密码验证。。注册者可以使用非常弱的密码进行注册,如:1或1234 所以我想编辑这个插件的register.php文件。。 我使用了以下代码,但它没有检查密码的强度。。有没有其他方法我可以用?通过使用add_filter() /** * Change the strength requirement on the woocommerce password * * Strength Settings * 4 = Strong * 3 = Medium (def
/**
* Change the strength requirement on the woocommerce password
*
* Strength Settings
* 4 = Strong
* 3 = Medium (default)
* 2 = Also Weak but a little stronger
* 1 = Password should be at least Weak
* 0 = Very Weak / Anything
*/
add_filter( 'woocommerce_min_password_strength', 'misha_change_password_strength' );
function misha_change_password_strength( $strength ) {
return 4;
}