Is there a way to disable random password generation in Word press ?
how can we disable wp_generate_password function
Is there a way to disable random password generation in Word press ?
how can we disable wp_generate_password function
For inexperienced users can be annoying/confusing to see auto-generated password on first screen. Add the following code to the wp-content/themes/your_current_theme/functions.php to disable this function.
add_filter( 'random_password', 'disable_random_password', 10, 2 );
function disable_random_password( $password ) {
$action = isset( $_GET['action'] ) ? $_GET['action'] : '';
if ( 'wp-login.php' === $GLOBALS['pagenow'] && ( 'rp' == $action || 'resetpass' == $action ) ) {
return '';
}
return $password;
}